summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcheck3
-rw-r--r--morphlib/builder.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/check b/check
index 25a3d655..4931e488 100755
--- a/check
+++ b/check
@@ -20,5 +20,4 @@
set -e
python setup.py clean check
-fakeroot env PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin" \
- cmdtest -c ./morph tests
+fakeroot cmdtest -c ./morph tests
diff --git a/morphlib/builder.py b/morphlib/builder.py
index 1ac18e0b..8d8fcf14 100644
--- a/morphlib/builder.py
+++ b/morphlib/builder.py
@@ -47,7 +47,10 @@ def ldconfig(ex, rootdir):
if os.path.exists(conf):
logging.debug('Running ldconfig for %s' % rootdir)
cache = os.path.join(rootdir, 'etc', 'ld.so.cache')
+ old_path = ex.env['PATH']
+ ex.env['PATH'] = '%s:/sbin:/usr/sbin:/usr/local/sbin' % old_path
ex.runv(['ldconfig', '-f', conf, '-C', cache, '-r', rootdir])
+ ex.env['PATH'] = old_path
else:
logging.debug('No %s, not running ldconfig' % conf)