summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Barker <pbarker@konsulko.com>2021-01-11 10:32:44 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-03 14:13:54 +0000
commit9cc3117aef8622b3c26d4fb5599f229d73204d2a (patch)
tree246fb7e4c732da154be93adb4f17c5eb761b7420 /scripts
parent7655375e15cdf31c2017efb9de8543f35cb1cbff (diff)
downloadpoky-9cc3117aef8622b3c26d4fb5599f229d73204d2a.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: 7acb39f02b8160600d1508da114e98dd1c3e76ed) 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: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 fe4abe8115..e4b5a0d519 100644
--- a/scripts/lib/wic/misc.py
+++ b/scripts/lib/wic/misc.py
@@ -128,9 +128,12 @@ def exec_native_cmd(cmd_and_args, native_sysroot, pseudo=""):
128 if pseudo: 128 if pseudo:
129 cmd_and_args = pseudo + cmd_and_args 129 cmd_and_args = pseudo + cmd_and_args
130 130
131 native_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin:%s/bin" % \ 131 hosttools_dir = get_bitbake_var("HOSTTOOLS_DIR")
132
133 native_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin:%s/bin:%s" % \
132 (native_sysroot, native_sysroot, 134 (native_sysroot, native_sysroot,
133 native_sysroot, native_sysroot) 135 native_sysroot, native_sysroot,
136 hosttools_dir)
134 137
135 native_cmd_and_args = "export PATH=%s:$PATH;%s" % \ 138 native_cmd_and_args = "export PATH=%s:$PATH;%s" % \
136 (native_paths, cmd_and_args) 139 (native_paths, cmd_and_args)