summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2015-09-08 13:58:14 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-09 14:27:49 +0100
commitbaf39c800a06096385426b265d45dd6552ebe699 (patch)
tree1ea13f6a1051db2823f6307a4a51a591b55c9b67 /meta
parent0ec0b17f4bafcc2c63920f1ad21680abc0596639 (diff)
downloadpoky-baf39c800a06096385426b265d45dd6552ebe699.tar.gz
kernel.bbclass: do not mv/link sources when externalsrc enabled
If externalsrc is enabled the 'do_unpack' task is run if the recipe has some local source files. In the case of kernel recipe this caused the (externalsrc) source tree to be moved/symlinked. This patch prevents the behaviour, making sure the source tree is not moved around when externalsrc is enabled. Instead of moving the source tree, STAGING_KERNEL_DIR will be a symlink to it. [YOCTO #6658] (From OE-Core rev: 8f6c564661a3801012eb2d9a98cdc99c91712367) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel.bbclass10
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 919293e43d..dfbdfd24ff 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -68,9 +68,13 @@ base_do_unpack_append () {
68 if s != kernsrc: 68 if s != kernsrc:
69 bb.utils.mkdirhier(kernsrc) 69 bb.utils.mkdirhier(kernsrc)
70 bb.utils.remove(kernsrc, recurse=True) 70 bb.utils.remove(kernsrc, recurse=True)
71 import subprocess 71 if d.getVar("EXTERNALSRC", True):
72 subprocess.call(d.expand("mv ${S} ${STAGING_KERNEL_DIR}"), shell=True) 72 # With EXTERNALSRC S will not be wiped so we can symlink to it
73 os.symlink(kernsrc, s) 73 os.symlink(s, kernsrc)
74 else:
75 import shutil
76 shutil.move(s, kernsrc)
77 os.symlink(kernsrc, s)
74} 78}
75 79
76inherit kernel-arch deploy 80inherit kernel-arch deploy