summaryrefslogtreecommitdiffstats
path: root/meta/classes/archiver.bbclass
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@nxp.com>2018-04-03 08:51:14 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-05 14:49:07 +0100
commitc2eec907cb9483dcc286eb1d6d2d7cfd6a649a39 (patch)
treeb314db8a300ae30c1e38bfba32facc019e619bfb /meta/classes/archiver.bbclass
parent34afa37f5f4765f73c63d440351a5cb63008a5cc (diff)
downloadpoky-c2eec907cb9483dcc286eb1d6d2d7cfd6a649a39.tar.gz
archiver: Fix build errors for kernels that don't use kernel-yocto.bbclass
Special handling for kernel source in work-shared was incorrectly limited to kernel-yocto.bbclass instead of kernel.bbclass. (From OE-Core rev: b8c5680a67888d43540366a40bd0c501e926ac31) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/archiver.bbclass')
-rw-r--r--meta/classes/archiver.bbclass8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index e17e6b4a4d..c1076155b7 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -319,6 +319,10 @@ def create_diff_gz(d, src_orig, src, ar_outdir):
319 finally: 319 finally:
320 os.chdir(cwd) 320 os.chdir(cwd)
321 321
322def is_work_shared(d):
323 pn = d.getVar('PN')
324 return bb.data.inherits_class('kernel', d) or pn.startswith('gcc-source')
325
322# Run do_unpack and do_patch 326# Run do_unpack and do_patch
323python do_unpack_and_patch() { 327python do_unpack_and_patch() {
324 if d.getVarFlag('ARCHIVER_MODE', 'src') not in \ 328 if d.getVarFlag('ARCHIVER_MODE', 'src') not in \
@@ -331,7 +335,7 @@ python do_unpack_and_patch() {
331 pn = d.getVar('PN') 335 pn = d.getVar('PN')
332 336
333 # The kernel class functions require it to be on work-shared, so we dont change WORKDIR 337 # The kernel class functions require it to be on work-shared, so we dont change WORKDIR
334 if not (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source')): 338 if not is_work_shared(d):
335 # Change the WORKDIR to make do_unpack do_patch run in another dir. 339 # Change the WORKDIR to make do_unpack do_patch run in another dir.
336 d.setVar('WORKDIR', ar_workdir) 340 d.setVar('WORKDIR', ar_workdir)
337 # Restore the original path to recipe's native sysroot (it's relative to WORKDIR). 341 # Restore the original path to recipe's native sysroot (it's relative to WORKDIR).
@@ -351,7 +355,7 @@ python do_unpack_and_patch() {
351 oe.path.copytree(src, src_orig) 355 oe.path.copytree(src, src_orig)
352 356
353 # Make sure gcc and kernel sources are patched only once 357 # Make sure gcc and kernel sources are patched only once
354 if not (d.getVar('SRC_URI') == "" or (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source'))): 358 if not (d.getVar('SRC_URI') == "" or is_work_shared(d)):
355 bb.build.exec_func('do_patch', d) 359 bb.build.exec_func('do_patch', d)
356 360
357 # Create the patches 361 # Create the patches