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-24 21:44:27 +0000 |
commit | 09dfc99a813090043262529beb6d900900e983dc (patch) | |
tree | 061c3974b64c09d3c3bea35eab4542e6f6b2d78f /meta/classes/archiver.bbclass | |
parent | e3239ade430ff48e00dce47066abe8fcb990af61 (diff) | |
download | openembedded-core-09dfc99a813090043262529beb6d900900e983dc.tar.gz openembedded-core-09dfc99a813090043262529beb6d900900e983dc.tar.bz2 openembedded-core-09dfc99a813090043262529beb6d900900e983dc.zip |
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.
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes/archiver.bbclass')
-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() { # Get the ARCHIVER_OUTDIR before we reset the WORKDIR ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) + ar_workdir = d.getVar('ARCHIVER_WORKDIR', True) bb.note('Archiving the patched source...') - d.setVar('WORKDIR', ar_outdir) + d.setVar('WORKDIR', ar_workdir) create_tarball(d, d.getVar('S', True), 'patched', ar_outdir) } @@ -250,21 +251,20 @@ python do_unpack_and_patch() { [ 'patched', 'configured'] and \ d.getVarFlag('ARCHIVER_MODE', 'diff', True) != '1': return - # Change the WORKDIR to make do_unpack do_patch run in another dir. ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) - d.setVar('WORKDIR', ar_outdir) - - # The changed 'WORKDIR' also caused 'B' changed, create dir 'B' for the - # possibly requiring of the following tasks (such as some recipes's - # do_patch required 'B' existed). - bb.utils.mkdirhier(d.getVar('B', True)) + ar_workdir = d.getVar('ARCHIVER_WORKDIR', True) # The kernel class functions require it to be on work-shared, so we dont change WORKDIR if not bb.data.inherits_class('kernel-yocto', d): - ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) - d.setVar('WORKDIR', ar_outdir) - bb.build.exec_func('do_unpack', d) + # Change the WORKDIR to make do_unpack do_patch run in another dir. + d.setVar('WORKDIR', ar_workdir) + # The changed 'WORKDIR' also caused 'B' changed, create dir 'B' for the + # possibly requiring of the following tasks (such as some recipes's + # do_patch required 'B' existed). + bb.utils.mkdirhier(d.getVar('B', True)) + + bb.build.exec_func('do_unpack', d) # Save the original source for creating the patches if d.getVarFlag('ARCHIVER_MODE', 'diff', True) == '1': |