diff options
author | Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | 2015-11-09 22:40:50 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-11-24 15:49:12 +0000 |
commit | d643e43622eb3e43fbb2e21fa33580e2fcdf42be (patch) | |
tree | 41ce20212a85522debf64664e6c4bffb25994409 | |
parent | bc394e1dd229845a315a97704beca43fbb8976ee (diff) | |
download | openembedded-core-d643e43622eb3e43fbb2e21fa33580e2fcdf42be.tar.gz openembedded-core-d643e43622eb3e43fbb2e21fa33580e2fcdf42be.tar.bz2 openembedded-core-d643e43622eb3e43fbb2e21fa33580e2fcdf42be.zip |
archiver.bbclass: fix previous issue regarding work-shared for linux-yocto
A previous patch intended to fix and improve the archiver class, and while it
did for gcc packages, with it some issues ended up being hidden, the kernel
tasks taken from kernel.bbclass and kernel-yocto.bbclass specifically expect the
kernel to use work-shared, which either ended up causing issues or wasting time
doing unnecessary work, this patch fixes these issues by performing the right
tasks within the archiver in the right order
[YOCTO #8378]
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r-- | meta/classes/archiver.bbclass | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 41a552c76b..d7a159dcd1 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass @@ -203,7 +203,7 @@ def create_tarball(d, srcdir, suffix, ar_outdir): import tarfile # Make sure we are only creating a single tarball for gcc sources - if d.getVar('SRC_URI', True) == "" and 'gcc' in d.getVar('PN', True): + if (d.getVar('SRC_URI', True) == ""): return bb.utils.mkdirhier(ar_outdir) @@ -259,22 +259,21 @@ python do_unpack_and_patch() { # do_patch required 'B' existed). bb.utils.mkdirhier(d.getVar('B', True)) - # The kernel source is ready after do_validate_branches - if bb.data.inherits_class('kernel-yocto', d): - bb.build.exec_func('do_unpack', d) - bb.build.exec_func('do_kernel_checkout', d) - bb.build.exec_func('do_validate_branches', d) - else: + # 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) + # Save the original source for creating the patches if d.getVarFlag('ARCHIVER_MODE', 'diff', True) == '1': src = d.getVar('S', True).rstrip('/') src_orig = '%s.orig' % src oe.path.copytree(src, src_orig) - # Make sure gcc sources are patched only once - if not ((d.getVar('SRC_URI', True) == "" and 'gcc' in d.getVar('PN', True))): + # Make sure gcc and kernel sources are patched only once + if not ((d.getVar('SRC_URI', True) == "" or bb.data.inherits_class('kernel-yocto', d))): bb.build.exec_func('do_patch', d) # Create the patches @@ -347,6 +346,7 @@ do_deploy_archives[sstate-inputdirs] = "${ARCHIVER_TOPDIR}" do_deploy_archives[sstate-outputdirs] = "${DEPLOY_DIR_SRC}" addtask do_ar_original after do_unpack +addtask do_unpack_and_patch after do_patch addtask do_ar_patched after do_unpack_and_patch addtask do_ar_configured after do_unpack_and_patch addtask do_dumpdata @@ -364,6 +364,4 @@ python () { # Add tasks in the correct order, specifically for linux-yocto to avoid race condition if bb.data.inherits_class('kernel-yocto', d): bb.build.addtask('do_kernel_configme', 'do_configure', 'do_unpack_and_patch', d) - else: - bb.build.addtask('do_unpack_and_patch', None, 'do_patch', d) } |