summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-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}