aboutsummaryrefslogtreecommitdiff
path: root/meta/classes
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:00 +0100
commitb8c5680a67888d43540366a40bd0c501e926ac31 (patch)
tree2a3b1db9193a73d429190a146585ab05e22e7cd1 /meta/classes
parent0792540170b6150a0c5fe8586bb8012affc3f90e (diff)
downloadopenembedded-core-b8c5680a67888d43540366a40bd0c501e926ac31.zip
openembedded-core-b8c5680a67888d43540366a40bd0c501e926ac31.tar.gz
openembedded-core-b8c5680a67888d43540366a40bd0c501e926ac31.tar.bz2
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. Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-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 e17e6b4..c107615 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):
finally:
os.chdir(cwd)
+def is_work_shared(d):
+ pn = d.getVar('PN')
+ return bb.data.inherits_class('kernel', d) or pn.startswith('gcc-source')
+
# Run do_unpack and do_patch
python do_unpack_and_patch() {
if d.getVarFlag('ARCHIVER_MODE', 'src') not in \
@@ -331,7 +335,7 @@ python do_unpack_and_patch() {
pn = d.getVar('PN')
# 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) or pn.startswith('gcc-source')):
+ if not is_work_shared(d):
# Change the WORKDIR to make do_unpack do_patch run in another dir.
d.setVar('WORKDIR', ar_workdir)
# Restore the original path to recipe's native sysroot (it's relative to WORKDIR).
@@ -351,7 +355,7 @@ python do_unpack_and_patch() {
oe.path.copytree(src, src_orig)
# Make sure gcc and kernel sources are patched only once
- if not (d.getVar('SRC_URI') == "" or (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source'))):
+ if not (d.getVar('SRC_URI') == "" or is_work_shared(d)):
bb.build.exec_func('do_patch', d)
# Create the patches