mirror of
https://git.yoctoproject.org/poky
synced 2026-02-11 19:23:03 +01:00
wic/engine.py: Load paths from PATH environment variable
Load self.paths from environment variable and if it fails, fall back to hardcoded list. This is required for users that would need to load different e2fsprogs binaries if their system's ones are not recent enought (From OE-Core rev: a88bcbae850a2e6d182291d3f8e167aabdbe4842) (From OE-Core rev: c8331fa157b83a3ed77f77a6e884c7fbc4f1d91b) Signed-off-by: William Bourque <wbourque@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
796788c025
commit
e90f7a24fe
@@ -244,8 +244,13 @@ class Disk:
|
||||
self._psector_size = None
|
||||
self._ptable_format = None
|
||||
|
||||
# find parted
|
||||
self.paths = "/bin:/usr/bin:/usr/sbin:/sbin/"
|
||||
# read paths from $PATH environment variable
|
||||
# if it fails, use hardcoded paths
|
||||
try:
|
||||
self.paths = os.environ['PATH']
|
||||
except KeyError:
|
||||
self.paths = "/bin:/usr/bin:/usr/sbin:/sbin/"
|
||||
|
||||
if native_sysroot:
|
||||
for path in self.paths.split(':'):
|
||||
self.paths = "%s%s:%s" % (native_sysroot, path, self.paths)
|
||||
|
||||
Reference in New Issue
Block a user