[oe-commits] [openembedded-core] 49/55: wic/engine: Fix missing parted autobuilder failures

git at git.openembedded.org git at git.openembedded.org
Mon Feb 25 22:29:45 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch thud
in repository openembedded-core.

commit 6e2bf8691ffd6004cb40e71a2d1d002b5ed5808f
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Fri Feb 15 07:57:25 2019 +0000

    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 at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 scripts/lib/wic/engine.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 880e464..ea600d2 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)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list