diff options
author | Mariano Lopez <mariano.lopez@linux.intel.com> | 2016-03-22 14:04:01 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-25 10:29:17 +0000 |
commit | c29eea0df832bf4a5111f43d10fcc0ae55e007d7 (patch) | |
tree | dd8469b09666065b153584a509404be8d55ae0b0 | |
parent | 8b7ee6ebebf765e5b4afea4d9846926a75e95f01 (diff) | |
download | poky-c29eea0df832bf4a5111f43d10fcc0ae55e007d7.tar.gz |
archiver.bbclass: Fix use of ARCHIVER_WORKDIR and ARCHIVER_OUTDIR
Currently do_unpack_and_patch() and do_ar_configured() are using
the ARCHIVER_OUTDIR as the ARCHIVER_WORKDIR, this lead to have
duplicated files inside the tars when using the archiver class
for patched and configured source.
(From OE-Core rev: 09dfc99a813090043262529beb6d900900e983dc)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/archiver.bbclass | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 221c7f4797..4064674294 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass | |||
@@ -156,8 +156,9 @@ python do_ar_patched() { | |||
156 | 156 | ||
157 | # Get the ARCHIVER_OUTDIR before we reset the WORKDIR | 157 | # Get the ARCHIVER_OUTDIR before we reset the WORKDIR |
158 | ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) | 158 | ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) |
159 | ar_workdir = d.getVar('ARCHIVER_WORKDIR', True) | ||
159 | bb.note('Archiving the patched source...') | 160 | bb.note('Archiving the patched source...') |
160 | d.setVar('WORKDIR', ar_outdir) | 161 | d.setVar('WORKDIR', ar_workdir) |
161 | create_tarball(d, d.getVar('S', True), 'patched', ar_outdir) | 162 | create_tarball(d, d.getVar('S', True), 'patched', ar_outdir) |
162 | } | 163 | } |
163 | 164 | ||
@@ -250,21 +251,20 @@ python do_unpack_and_patch() { | |||
250 | [ 'patched', 'configured'] and \ | 251 | [ 'patched', 'configured'] and \ |
251 | d.getVarFlag('ARCHIVER_MODE', 'diff', True) != '1': | 252 | d.getVarFlag('ARCHIVER_MODE', 'diff', True) != '1': |
252 | return | 253 | return |
253 | # Change the WORKDIR to make do_unpack do_patch run in another dir. | ||
254 | ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) | 254 | ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) |
255 | d.setVar('WORKDIR', ar_outdir) | 255 | ar_workdir = d.getVar('ARCHIVER_WORKDIR', True) |
256 | |||
257 | # The changed 'WORKDIR' also caused 'B' changed, create dir 'B' for the | ||
258 | # possibly requiring of the following tasks (such as some recipes's | ||
259 | # do_patch required 'B' existed). | ||
260 | bb.utils.mkdirhier(d.getVar('B', True)) | ||
261 | 256 | ||
262 | # The kernel class functions require it to be on work-shared, so we dont change WORKDIR | 257 | # The kernel class functions require it to be on work-shared, so we dont change WORKDIR |
263 | if not bb.data.inherits_class('kernel-yocto', d): | 258 | if not bb.data.inherits_class('kernel-yocto', d): |
264 | ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) | 259 | # Change the WORKDIR to make do_unpack do_patch run in another dir. |
265 | d.setVar('WORKDIR', ar_outdir) | 260 | d.setVar('WORKDIR', ar_workdir) |
266 | bb.build.exec_func('do_unpack', d) | ||
267 | 261 | ||
262 | # The changed 'WORKDIR' also caused 'B' changed, create dir 'B' for the | ||
263 | # possibly requiring of the following tasks (such as some recipes's | ||
264 | # do_patch required 'B' existed). | ||
265 | bb.utils.mkdirhier(d.getVar('B', True)) | ||
266 | |||
267 | bb.build.exec_func('do_unpack', d) | ||
268 | 268 | ||
269 | # Save the original source for creating the patches | 269 | # Save the original source for creating the patches |
270 | if d.getVarFlag('ARCHIVER_MODE', 'diff', True) == '1': | 270 | if d.getVarFlag('ARCHIVER_MODE', 'diff', True) == '1': |