[RFC,09/10] scripts/lib/wic: Add /bin to the list of searchpaths

Message ID 20200824105905.21110-5-Vijaikumar_Kanagarajan@mentor.com
State Superseded, archived
Headers show
Series None | expand

Commit Message

Vijai Kumar K Aug. 24, 2020, 2:59 a.m. UTC
exec_native_cmd doesnot search for the binaries in /bin.
Commands like tar which are essential for certain wic operations
are present in /bin in distros like debian.

Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
---
 scripts/lib/wic/misc.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/scripts/lib/wic/misc.py b/scripts/lib/wic/misc.py
index 91975ba..4b08d64 100644
--- a/scripts/lib/wic/misc.py
+++ b/scripts/lib/wic/misc.py
@@ -138,8 +138,9 @@  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" % \
-                   (native_sysroot, native_sysroot, native_sysroot)
+    native_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin:%s/bin" % \
+                   (native_sysroot, native_sysroot,
+                    native_sysroot, native_sysroot)
 
     native_cmd_and_args = "export PATH=%s:$PATH;%s" % \
                    (native_paths, cmd_and_args)