diff options
-rw-r--r-- | meta/classes/archiver.bbclass | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 4049694d85..0eee1abefa 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass | |||
@@ -76,33 +76,39 @@ do_ar_original[dirs] = "${ARCHIVER_OUTDIR} ${ARCHIVER_WORKDIR}" | |||
76 | 76 | ||
77 | # This is a convenience for the shell script to use it | 77 | # This is a convenience for the shell script to use it |
78 | 78 | ||
79 | 79 | def include_package(d, pn): | |
80 | python () { | ||
81 | pn = d.getVar('PN') | ||
82 | assume_provided = (d.getVar("ASSUME_PROVIDED") or "").split() | ||
83 | if pn in assume_provided: | ||
84 | for p in d.getVar("PROVIDES").split(): | ||
85 | if p != pn: | ||
86 | pn = p | ||
87 | break | ||
88 | 80 | ||
89 | included, reason = copyleft_should_include(d) | 81 | included, reason = copyleft_should_include(d) |
90 | if not included: | 82 | if not included: |
91 | bb.debug(1, 'archiver: %s is excluded: %s' % (pn, reason)) | 83 | bb.debug(1, 'archiver: %s is excluded: %s' % (pn, reason)) |
92 | return | 84 | return False |
85 | |||
93 | else: | 86 | else: |
94 | bb.debug(1, 'archiver: %s is included: %s' % (pn, reason)) | 87 | bb.debug(1, 'archiver: %s is included: %s' % (pn, reason)) |
95 | 88 | ||
96 | |||
97 | # glibc-locale: do_fetch, do_unpack and do_patch tasks have been deleted, | 89 | # glibc-locale: do_fetch, do_unpack and do_patch tasks have been deleted, |
98 | # so avoid archiving source here. | 90 | # so avoid archiving source here. |
99 | if pn.startswith('glibc-locale'): | 91 | if pn.startswith('glibc-locale'): |
100 | return | 92 | return False |
101 | 93 | ||
102 | # We just archive gcc-source for all the gcc related recipes | 94 | # We just archive gcc-source for all the gcc related recipes |
103 | if d.getVar('BPN') in ['gcc', 'libgcc'] \ | 95 | if d.getVar('BPN') in ['gcc', 'libgcc'] \ |
104 | and not pn.startswith('gcc-source'): | 96 | and not pn.startswith('gcc-source'): |
105 | bb.debug(1, 'archiver: %s is excluded, covered by gcc-source' % pn) | 97 | bb.debug(1, 'archiver: %s is excluded, covered by gcc-source' % pn) |
98 | return False | ||
99 | |||
100 | return True | ||
101 | |||
102 | python () { | ||
103 | pn = d.getVar('PN') | ||
104 | assume_provided = (d.getVar("ASSUME_PROVIDED") or "").split() | ||
105 | if pn in assume_provided: | ||
106 | for p in d.getVar("PROVIDES").split(): | ||
107 | if p != pn: | ||
108 | pn = p | ||
109 | break | ||
110 | |||
111 | if not include_package(d, pn): | ||
106 | return | 112 | return |
107 | 113 | ||
108 | # TARGET_SYS in ARCHIVER_ARCH will break the stamp for gcc-source in multiconfig | 114 | # TARGET_SYS in ARCHIVER_ARCH will break the stamp for gcc-source in multiconfig |