From ef6682d7b2445226f43c857690a740c2c2a6916c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 1 Apr 2006 07:34:48 +0000 Subject: 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 --- pym/portage.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pym') 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 -- cgit v1.2.3-1-g7c22