summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorPaul Barker <pbarker@konsulko.com>2021-01-11 10:32:44 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-27 09:32:45 +0000
commitd8b7d59e661fb530ef29a4757c92365ac673cd4a (patch)
treee28c9e815d71e7161228787ffe2176afd24f9623 /scripts/lib
parentc9009b45541c267d6f605b6f310dea958b8f6809 (diff)
downloadpoky-d8b7d59e661fb530ef29a4757c92365ac673cd4a.tar.gz
wic: Allow exec_native_cmd to run HOSTTOOLS
This allows programs from HOSTTOOLS (e.g. 'install', 'rm', 'mv', etc) to be more easily executed by wic. Without this change only programs from an actual *-native recipe built by bitbake can be executed by wic. (From OE-Core rev: 00474d990174c3c4af6e0a6058871f925380750a) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8eb186acdecfbb3151c9a0ab148358e3fe5cce39) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/wic/misc.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/lib/wic/misc.py b/scripts/lib/wic/misc.py
index 4b08d649c6..75b219cd3f 100644
--- a/scripts/lib/wic/misc.py
+++ b/scripts/lib/wic/misc.py
@@ -138,9 +138,12 @@ def exec_native_cmd(cmd_and_args, native_sysroot, pseudo=""):
138 if pseudo: 138 if pseudo:
139 cmd_and_args = pseudo + cmd_and_args 139 cmd_and_args = pseudo + cmd_and_args
140 140
141 native_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin:%s/bin" % \ 141 hosttools_dir = get_bitbake_var("HOSTTOOLS_DIR")
142
143 native_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin:%s/bin:%s" % \
142 (native_sysroot, native_sysroot, 144 (native_sysroot, native_sysroot,
143 native_sysroot, native_sysroot) 145 native_sysroot, native_sysroot,
146 hosttools_dir)
144 147
145 native_cmd_and_args = "export PATH=%s:$PATH;%s" % \ 148 native_cmd_and_args = "export PATH=%s:$PATH;%s" % \
146 (native_paths, cmd_and_args) 149 (native_paths, cmd_and_args)