summaryrefslogtreecommitdiff
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/kernel.bbclass')
-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 () {
if s != kernsrc:
bb.utils.mkdirhier(kernsrc)
bb.utils.remove(kernsrc, recurse=True)
- import subprocess
- subprocess.call(d.expand("mv ${S} ${STAGING_KERNEL_DIR}"), shell=True)
- os.symlink(kernsrc, s)
+ if d.getVar("EXTERNALSRC", True):
+ # With EXTERNALSRC S will not be wiped so we can symlink to it
+ os.symlink(s, kernsrc)
+ else:
+ import shutil
+ shutil.move(s, kernsrc)
+ os.symlink(kernsrc, s)
}
inherit kernel-arch deploy