diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-08-29 09:22:17 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-08-29 09:22:17 -0700 |
commit | a37eb8ebd2fad3f8074490a061f067e2c637f05d (patch) | |
tree | b1ef5db0c149d8a67a86b15da330aa200d80add0 | |
parent | ee7ee34f4669cfdef6867952b6830d15e4caae01 (diff) | |
download | portage-a37eb8ebd2fad3f8074490a061f067e2c637f05d.tar.gz portage-a37eb8ebd2fad3f8074490a061f067e2c637f05d.tar.bz2 portage-a37eb8ebd2fad3f8074490a061f067e2c637f05d.zip |
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.
-rw-r--r-- | pym/portage/dbapi/vartree.py | 2 | ||||
-rw-r--r-- | pym/portage/util/env_update.py | 11 |
2 files changed, 5 insertions, 8 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 6281f7ee5..afcbceb55 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3815,7 +3815,7 @@ class dblink(object): self.vartree.dbapi._fs_lock() try: #update environment settings, library paths. DO NOT change symlinks. - env_update(makelinks=(not downgrade), + env_update( target_root=self.settings['ROOT'], prev_mtimes=prev_mtimes, contents=contents, env=self.settings, writemsg_level=self._display_merge) 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 |