diff options
Diffstat (limited to 'meta/classes/archiver.bbclass')
-rw-r--r-- | meta/classes/archiver.bbclass | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 2f3b278fb3..5f9c91d2f8 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass | |||
@@ -132,7 +132,25 @@ python do_ar_original() { | |||
132 | 132 | ||
133 | ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) | 133 | ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) |
134 | bb.note('Archiving the original source...') | 134 | bb.note('Archiving the original source...') |
135 | fetch = bb.fetch2.Fetch([], d) | 135 | urls = d.getVar("SRC_URI", True).split() |
136 | # destsuffix (git fetcher) and subdir (everything else) are allowed to be | ||
137 | # absolute paths (for example, destsuffix=${S}/foobar). | ||
138 | # That messes with unpacking inside our tmpdir below, because the fetchers | ||
139 | # will then unpack in that directory and completely ignore the tmpdir. | ||
140 | # That breaks parallel tasks relying on ${S}, like do_compile. | ||
141 | # | ||
142 | # To solve this, we remove these parameters from all URLs. | ||
143 | # We do this even for relative paths because it makes the content of the | ||
144 | # archives more useful (no extra paths that are only used during | ||
145 | # compilation). | ||
146 | for i, url in enumerate(urls): | ||
147 | decoded = bb.fetch2.decodeurl(url) | ||
148 | for param in ('destsuffix', 'subdir'): | ||
149 | if param in decoded[5]: | ||
150 | del decoded[5][param] | ||
151 | encoded = bb.fetch2.encodeurl(decoded) | ||
152 | urls[i] = encoded | ||
153 | fetch = bb.fetch2.Fetch(urls, d) | ||
136 | for url in fetch.urls: | 154 | for url in fetch.urls: |
137 | local = fetch.localpath(url).rstrip("/"); | 155 | local = fetch.localpath(url).rstrip("/"); |
138 | if os.path.isfile(local): | 156 | if os.path.isfile(local): |