summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-15 07:57:25 +0000
committerArmin Kuster <akuster808@gmail.com>2019-04-07 15:09:57 +0530
commit68f56a4967d3121940669ca9116e759081b0b73b (patch)
treeba7d614f7896704e35207c9b5443dd4a984d0052
parentc8331fa157b83a3ed77f77a6e884c7fbc4f1d91b (diff)
downloadopenembedded-core-contrib-68f56a4967d3121940669ca9116e759081b0b73b.tar.gz
openembedded-core-contrib-68f56a4967d3121940669ca9116e759081b0b73b.tar.bz2
openembedded-core-contrib-68f56a4967d3121940669ca9116e759081b0b73b.zip
wic/engine: Fix missing parted autobuilder failures
OE-Core rev: a88bcbae850a2e6d182291d3f8e167aabdbe4842 broke the ability to find parted as it may be in sbin which is not in PATH for some users on some distros. Iterate on the original patch to fix this and also fix the original problem. (From OE-Core rev: af3803e5189d7814f9dbd238fb6dab200f351e1a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-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 c1270456f5..7e6519ea4c 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -244,15 +244,17 @@ class Disk:
self._psector_size = None
self._ptable_format = None
+ # find parted
# read paths from $PATH environment variable
# if it fails, use hardcoded paths
+ pathlist = "/bin:/usr/bin:/usr/sbin:/sbin/"
try:
- self.paths = os.environ['PATH']
+ self.paths = os.environ['PATH'] + ":" + pathlist
except KeyError:
- self.paths = "/bin:/usr/bin:/usr/sbin:/sbin/"
+ self.paths = pathlist
if native_sysroot:
- for path in self.paths.split(':'):
+ for path in pathlist.split(':'):
self.paths = "%s%s:%s" % (native_sysroot, path, self.paths)
self.parted = find_executable("parted", self.paths)