diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-02-28 18:02:17 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-02-28 18:02:17 +0000 |
commit | 2b3046e3ab89f746de7ed58e5bf7ed9156afb2b2 (patch) | |
tree | 4e47dfd9ec404335cf838599bde3b1b253fda0dc /morphlib/builder.py | |
parent | b73a26d1c876cbebb41d27c976a82fd2e5a72a91 (diff) | |
download | morph-2b3046e3ab89f746de7ed58e5bf7ed9156afb2b2.tar.gz |
Add comment explaining PATH trickery when running ldconfig
Diffstat (limited to 'morphlib/builder.py')
-rw-r--r-- | morphlib/builder.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py index a29157ae..d7d3d97a 100644 --- a/morphlib/builder.py +++ b/morphlib/builder.py @@ -46,6 +46,13 @@ 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') + + # The following trickery with $PATH is necessary during the Baserock + # bootstrap build: we are not guaranteed that PATH contains the + # directory (/sbin conventionally) that ldconfig is in. Then again, + # it might, and if so, we don't want to hardware a particular + # location. So we add the possible locations to the end of $PATH + # and restore that aftewards. old_path = ex.env['PATH'] ex.env['PATH'] = '%s:/sbin:/usr/sbin:/usr/local/sbin' % old_path ex.runv(['ldconfig', '-r', rootdir]) |