From ea07f0325cdbeb40884aa55707b8787b63554e3e Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Mon, 6 Apr 2015 20:43:35 +0300 Subject: wic: use native parted Used exec_native_cmd instead of find_binary_path to run parted. Got rid of find_binary_path as it's not used anywhere else. There are several tools wic is trying to find not only in sysroot, but also in host root. Parted is a special as on some distros it's installed in /usr/sbin, which is not in the user's PATH. This makes wic to fail with error "External command 'parted' not found, exiting." [YOCTO #7122] (From OE-Core rev: 76adf38c0d8e0faf04a5ecb3fcfbe831c85bb81f) Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- scripts/lib/wic/utils/fs_related.py | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'scripts/lib/wic/utils/fs_related.py') diff --git a/scripts/lib/wic/utils/fs_related.py b/scripts/lib/wic/utils/fs_related.py index d0bc8ee6d3..fb9054d568 100644 --- a/scripts/lib/wic/utils/fs_related.py +++ b/scripts/lib/wic/utils/fs_related.py @@ -25,24 +25,6 @@ from wic.utils import runner from wic.utils.errors import * from wic.utils.oe.misc import * -def find_binary_path(binary): - if os.environ.has_key("PATH"): - paths = os.environ["PATH"].split(":") - else: - paths = [] - if os.environ.has_key("HOME"): - paths += [os.environ["HOME"] + "/bin"] - paths += ["/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin"] - - for path in paths: - bin_path = "%s/%s" % (path, binary) - if os.path.exists(bin_path): - return bin_path - - print "External command '%s' not found, exiting." % binary - print " (Please install '%s' on your host system)" % binary - sys.exit(1) - def makedirs(dirname): """A version of os.makedirs() that doesn't throw an exception if the leaf directory already exists. -- cgit v1.2.3-54-g00ecf