summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-04-01 07:34:48 +0000
committerZac Medico <zmedico@gentoo.org>2006-04-01 07:34:48 +0000
commitef6682d7b2445226f43c857690a740c2c2a6916c (patch)
tree283b41f374efb70695d67ddff1df5147934ff688
parent02a6e19658f9ae8f9ef7de8d1082bff4f20c7d33 (diff)
downloadportage-ef6682d7b2445226f43c857690a740c2c2a6916c.tar.gz
portage-ef6682d7b2445226f43c857690a740c2c2a6916c.tar.bz2
portage-ef6682d7b2445226f43c857690a740c2c2a6916c.zip
Fix ROOT handling for timestamps of lib directories. Only run ldconfig when timestamps have changed (the makelinks flag does not force ldconfig unless timestamps have changed).
svn path=/main/trunk/; revision=3046
-rw-r--r--pym/portage.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 330d9a1da..76ab58ac6 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -618,7 +618,8 @@ def env_update(makelinks=1, srcroot=None):
if not mtimedb.has_key("ldpath"):
mtimedb["ldpath"]={}
- for x in portage_util.unique_array(specials["LDPATH"]+['/usr/lib','/usr/lib64','/usr/lib32','/lib','/lib64','/lib32']):
+ for lib_dir in portage_util.unique_array(specials["LDPATH"]+['usr/lib','usr/lib64','usr/lib32','lib','lib64','lib32']):
+ x = os.path.join(root, lib_dir.lstrip(os.sep))
try:
newldpathtime = os.stat(x)[stat.ST_MTIME]
except OSError, oe:
@@ -642,7 +643,7 @@ def env_update(makelinks=1, srcroot=None):
mtime_changed = True
if mtime_changed:
- if srcroot is None:
+ if makelinks or srcroot is None:
ld_cache_update = True
continue
src_dir = os.path.join(srcroot, x.lstrip(os.sep))
@@ -655,7 +656,7 @@ def env_update(makelinks=1, srcroot=None):
break
# Only run ldconfig as needed
- if (ld_cache_update or makelinks):
+ if ld_cache_update:
# ldconfig has very different behaviour between FreeBSD and Linux
if ostype=="Linux" or ostype.lower().endswith("gnu"):
# We can't update links if we haven't cleaned other versions first, as