summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Barker <pbarker@konsulko.com>2021-01-11 10:32:44 +0000
committerAnuj Mittal <anuj.mittal@intel.com>2021-01-21 14:02:54 +0800
commit00474d990174c3c4af6e0a6058871f925380750a (patch)
tree75a21a5c0a4b2ac00c065c274e1aee39461d9126 /scripts
parent365b10a95ac0b04ca48a53e55cf5a0a330f1bc2f (diff)
downloadopenembedded-core-00474d990174c3c4af6e0a6058871f925380750a.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. 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>
Diffstat (limited to 'scripts')
-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=""):
if pseudo:
cmd_and_args = pseudo + cmd_and_args
- native_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin:%s/bin" % \
+ hosttools_dir = get_bitbake_var("HOSTTOOLS_DIR")
+
+ native_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin:%s/bin:%s" % \
(native_sysroot, native_sysroot,
- native_sysroot, native_sysroot)
+ native_sysroot, native_sysroot,
+ hosttools_dir)
native_cmd_and_args = "export PATH=%s:$PATH;%s" % \
(native_paths, cmd_and_args)