summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>2015-11-09 22:40:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-24 15:50:26 +0000
commit2f0ff3abb448dc23d9420986fcbab80c9da7cd25 (patch)
treeef2ba254bb93f295a2945922388b192453a69e36 /meta/classes
parent0cc4eef515c0b9604cc2d12cdccb3804ee13d061 (diff)
downloadpoky-2f0ff3abb448dc23d9420986fcbab80c9da7cd25.tar.gz
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] (From OE-Core rev: d643e43622eb3e43fbb2e21fa33580e2fcdf42be) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/archiver.bbclass20
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):
203 import tarfile 203 import tarfile
204 204
205 # Make sure we are only creating a single tarball for gcc sources 205 # Make sure we are only creating a single tarball for gcc sources
206 if d.getVar('SRC_URI', True) == "" and 'gcc' in d.getVar('PN', True): 206 if (d.getVar('SRC_URI', True) == ""):
207 return 207 return
208 208
209 bb.utils.mkdirhier(ar_outdir) 209 bb.utils.mkdirhier(ar_outdir)
@@ -259,22 +259,21 @@ python do_unpack_and_patch() {
259 # do_patch required 'B' existed). 259 # do_patch required 'B' existed).
260 bb.utils.mkdirhier(d.getVar('B', True)) 260 bb.utils.mkdirhier(d.getVar('B', True))
261 261
262 # The kernel source is ready after do_validate_branches 262 # The kernel class functions require it to be on work-shared, so we dont change WORKDIR
263 if bb.data.inherits_class('kernel-yocto', d): 263 if not bb.data.inherits_class('kernel-yocto', d):
264 bb.build.exec_func('do_unpack', d) 264 ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
265 bb.build.exec_func('do_kernel_checkout', d) 265 d.setVar('WORKDIR', ar_outdir)
266 bb.build.exec_func('do_validate_branches', d)
267 else:
268 bb.build.exec_func('do_unpack', d) 266 bb.build.exec_func('do_unpack', d)
269 267
268
270 # Save the original source for creating the patches 269 # Save the original source for creating the patches
271 if d.getVarFlag('ARCHIVER_MODE', 'diff', True) == '1': 270 if d.getVarFlag('ARCHIVER_MODE', 'diff', True) == '1':
272 src = d.getVar('S', True).rstrip('/') 271 src = d.getVar('S', True).rstrip('/')
273 src_orig = '%s.orig' % src 272 src_orig = '%s.orig' % src
274 oe.path.copytree(src, src_orig) 273 oe.path.copytree(src, src_orig)
275 274
276 # Make sure gcc sources are patched only once 275 # Make sure gcc and kernel sources are patched only once
277 if not ((d.getVar('SRC_URI', True) == "" and 'gcc' in d.getVar('PN', True))): 276 if not ((d.getVar('SRC_URI', True) == "" or bb.data.inherits_class('kernel-yocto', d))):
278 bb.build.exec_func('do_patch', d) 277 bb.build.exec_func('do_patch', d)
279 278
280 # Create the patches 279 # Create the patches
@@ -347,6 +346,7 @@ do_deploy_archives[sstate-inputdirs] = "${ARCHIVER_TOPDIR}"
347do_deploy_archives[sstate-outputdirs] = "${DEPLOY_DIR_SRC}" 346do_deploy_archives[sstate-outputdirs] = "${DEPLOY_DIR_SRC}"
348 347
349addtask do_ar_original after do_unpack 348addtask do_ar_original after do_unpack
349addtask do_unpack_and_patch after do_patch
350addtask do_ar_patched after do_unpack_and_patch 350addtask do_ar_patched after do_unpack_and_patch
351addtask do_ar_configured after do_unpack_and_patch 351addtask do_ar_configured after do_unpack_and_patch
352addtask do_dumpdata 352addtask do_dumpdata
@@ -364,6 +364,4 @@ python () {
364 # Add tasks in the correct order, specifically for linux-yocto to avoid race condition 364 # Add tasks in the correct order, specifically for linux-yocto to avoid race condition
365 if bb.data.inherits_class('kernel-yocto', d): 365 if bb.data.inherits_class('kernel-yocto', d):
366 bb.build.addtask('do_kernel_configme', 'do_configure', 'do_unpack_and_patch', d) 366 bb.build.addtask('do_kernel_configme', 'do_configure', 'do_unpack_and_patch', d)
367 else:
368 bb.build.addtask('do_unpack_and_patch', None, 'do_patch', d)
369} 367}