]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: use 2 sysroots to find native executable
authorEd Bartosh <ed.bartosh@linux.intel.com>
Tue, 21 Feb 2017 09:37:17 +0000 (11:37 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 4 Mar 2017 10:42:31 +0000 (10:42 +0000)
Currently there is no way to specify a dependency on native
tools for wic without modifying wic-tools recipe. Obvious
way to make it more flexible is to use image sysroot and
wic-tools together to find an executable.

Modified run_native_cmd to use image and wic-tools sysroots
to find native executable.

[YOCTO #11017]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
scripts/lib/wic/utils/misc.py

index 4b822f0eee2d6a8c91fae0b02f85cbaa1aad04c6..3bab2f1ea24ca8803b40dc865a0009d42993e68c 100644 (file)
@@ -105,9 +105,13 @@ def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""):
 
     if pseudo:
         cmd_and_args = pseudo + cmd_and_args
+
+    wtools_sysroot = get_bitbake_var("RECIPE_SYSROOT_NATIVE", "wic-tools")
+
     native_paths = \
-        "%s/sbin:%s/usr/sbin:%s/usr/bin" % \
-        (native_sysroot, native_sysroot, native_sysroot)
+            "%s/sbin:%s/usr/sbin:%s/usr/bin:%s/sbin:%s/usr/sbin:%s/usr/bin" % \
+            (wtools_sysroot, wtools_sysroot, wtools_sysroot,
+             native_sysroot, native_sysroot, native_sysroot)
     native_cmd_and_args = "export PATH=%s:$PATH;%s" % \
                            (native_paths, cmd_and_args)
     logger.debug("exec_native_cmd: %s", cmd_and_args)