From a37eb8ebd2fad3f8074490a061f067e2c637f05d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 29 Aug 2011 09:22:17 -0700 Subject: env_update: always respect makelinks=False This ensures that the env-update --no-ldconfig option is always respected. Also, in order to preserve behavior during downgrades for an env_update call in vartree.py, remove the makelinks=False for downgrades since it wasn't respected anyway when lib path mtimes had changed, and we don't want it to behave differently in this case now that makelinks=False is always respected. Note that the unconditional use of the ldconfig -X option (from bug #373341) since commit e1347f9c0dd5ef5ff1a50d6b136b0648efb8a6ca may also come into play for downgrades. --- pym/portage/util/env_update.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'pym/portage/util/env_update.py') diff --git a/pym/portage/util/env_update.py b/pym/portage/util/env_update.py index c670ded94..173166351 100644 --- a/pym/portage/util/env_update.py +++ b/pym/portage/util/env_update.py @@ -147,7 +147,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None, raise oldld = None - ld_cache_update=False + ldsoconf_update = False newld = specials["LDPATH"] if (oldld != newld): @@ -158,7 +158,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None, for x in specials["LDPATH"]: myfd.write(x + "\n") myfd.close() - ld_cache_update=True + ldsoconf_update = True # Update prelink.conf if we are prelink-enabled if prelink_capable: @@ -229,11 +229,8 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None, prev_mtimes[x] = newldpathtime mtime_changed = True - if mtime_changed: - ld_cache_update = True - if makelinks and \ - not ld_cache_update and \ + not mtime_changed and \ contents is not None: libdir_contents_changed = False for mypath, mydata in contents.items(): @@ -252,7 +249,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None, ldconfig = find_binary("%s-ldconfig" % settings["CHOST"]) # Only run ldconfig as needed - if (ld_cache_update or makelinks) and ldconfig and not eprefix: + if makelinks and ldconfig and not eprefix: # 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