summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2015-09-08 10:58:14 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-16 15:16:55 (GMT)
commite6fca31dc04ecc2ba371c6c9354c237eb000abe6 (patch)
tree02316475d9d7fb3e10e34fc07332a7fcea62efc5
parentb213ada9a738448d920a9c1786ee0d85b378284f (diff)
downloadpoky-e6fca31dc04ecc2ba371c6c9354c237eb000abe6.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 master rev: 8f6c564661a3801012eb2d9a98cdc99c91712367) (From OE-Core rev: ca55a01908126c45120fc18e68e78f8f49ecf0ce) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 74092e9..83a50cb 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -51,9 +51,13 @@ base_do_unpack_append () {
51 if s != kernsrc: 51 if s != kernsrc:
52 bb.utils.mkdirhier(kernsrc) 52 bb.utils.mkdirhier(kernsrc)
53 bb.utils.remove(kernsrc, recurse=True) 53 bb.utils.remove(kernsrc, recurse=True)
54 import subprocess 54 if d.getVar("EXTERNALSRC", True):
55 subprocess.call(d.expand("mv ${S} ${STAGING_KERNEL_DIR}"), shell=True) 55 # With EXTERNALSRC S will not be wiped so we can symlink to it
56 os.symlink(kernsrc, s) 56 os.symlink(s, kernsrc)
57 else:
58 import shutil
59 shutil.move(s, kernsrc)
60 os.symlink(kernsrc, s)
57} 61}
58 62
59inherit kernel-arch deploy 63inherit kernel-arch deploy