summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic')
-rw-r--r--scripts/lib/wic/engine.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 880e464036..ea600d2854 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -244,15 +244,17 @@ class Disk:
244 self._psector_size = None 244 self._psector_size = None
245 self._ptable_format = None 245 self._ptable_format = None
246 246
247 # find parted
247 # read paths from $PATH environment variable 248 # read paths from $PATH environment variable
248 # if it fails, use hardcoded paths 249 # if it fails, use hardcoded paths
250 pathlist = "/bin:/usr/bin:/usr/sbin:/sbin/"
249 try: 251 try:
250 self.paths = os.environ['PATH'] 252 self.paths = os.environ['PATH'] + ":" + pathlist
251 except KeyError: 253 except KeyError:
252 self.paths = "/bin:/usr/bin:/usr/sbin:/sbin/" 254 self.paths = pathlist
253 255
254 if native_sysroot: 256 if native_sysroot:
255 for path in self.paths.split(':'): 257 for path in pathlist.split(':'):
256 self.paths = "%s%s:%s" % (native_sysroot, path, self.paths) 258 self.paths = "%s%s:%s" % (native_sysroot, path, self.paths)
257 259
258 self.parted = find_executable("parted", self.paths) 260 self.parted = find_executable("parted", self.paths)