summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/lib/wic/utils/oe/misc.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/oe/misc.py
index 11209be58e..0854dfbac1 100644
--- a/scripts/lib/wic/utils/oe/misc.py
+++ b/scripts/lib/wic/utils/oe/misc.py
@@ -28,6 +28,7 @@
28 28
29import os 29import os
30from collections import defaultdict 30from collections import defaultdict
31from distutils import spawn
31 32
32from wic import msger 33from wic import msger
33from wic.utils import runner 34from wic.utils import runner
@@ -83,13 +84,6 @@ def exec_cmd(cmd_and_args, as_shell=False, catch=3):
83 84
84 return out 85 return out
85 86
86def cmd_in_path(cmd, path):
87 import scriptpath
88
89 scriptpath.add_bitbake_lib_path()
90
91 return bb.utils.which(path, cmd) != "" or False
92
93def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""): 87def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""):
94 """ 88 """
95 Execute native command, catching stderr, stdout 89 Execute native command, catching stderr, stdout
@@ -112,7 +106,7 @@ def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""):
112 msger.debug("exec_native_cmd: %s" % cmd_and_args) 106 msger.debug("exec_native_cmd: %s" % cmd_and_args)
113 107
114 # If the command isn't in the native sysroot say we failed. 108 # If the command isn't in the native sysroot say we failed.
115 if cmd_in_path(args[0], native_paths): 109 if spawn.find_executable(args[0], native_paths):
116 ret, out = _exec_cmd(native_cmd_and_args, True, catch) 110 ret, out = _exec_cmd(native_cmd_and_args, True, catch)
117 else: 111 else:
118 ret = 127 112 ret = 127