1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 12:49:46 +00:00

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>
This commit is contained in:
Markus Lehtonen
2015-09-08 13:58:14 +03:00
committed by Richard Purdie
parent b213ada9a7
commit e6fca31dc0
+7 -3
View File
@@ -51,9 +51,13 @@ base_do_unpack_append () {
if s != kernsrc: if s != kernsrc:
bb.utils.mkdirhier(kernsrc) bb.utils.mkdirhier(kernsrc)
bb.utils.remove(kernsrc, recurse=True) bb.utils.remove(kernsrc, recurse=True)
import subprocess if d.getVar("EXTERNALSRC", True):
subprocess.call(d.expand("mv ${S} ${STAGING_KERNEL_DIR}"), shell=True) # With EXTERNALSRC S will not be wiped so we can symlink to it
os.symlink(kernsrc, s) os.symlink(s, kernsrc)
else:
import shutil
shutil.move(s, kernsrc)
os.symlink(kernsrc, s)
} }
inherit kernel-arch deploy inherit kernel-arch deploy