summaryrefslogtreecommitdiffstats
path: root/pym/portage/util/env_update.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-08-29 00:40:11 -0700
committerZac Medico <zmedico@gentoo.org>2011-08-29 00:40:11 -0700
commit35d900fab79b934517a2bf611bd919cb6a99aa7d (patch)
tree2184ffec0a6721c0b4c9d7cb77e9b2b67bb4f976 /pym/portage/util/env_update.py
parent9b3263f03f23eae1f88c03cd78a4fd05f1e2db68 (diff)
downloadportage-35d900fab79b934517a2bf611bd919cb6a99aa7d.tar.gz
portage-35d900fab79b934517a2bf611bd919cb6a99aa7d.tar.bz2
portage-35d900fab79b934517a2bf611bd919cb6a99aa7d.zip
env_update: fix CHOST/CBUILD ldconfig code
This code never worked (since it was added in commit 751893b0272561eb9274110a474d5436a7d2bc76) due to a name collision between the env argument and another variable with the same name.
Diffstat (limited to 'pym/portage/util/env_update.py')
-rw-r--r--pym/portage/util/env_update.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/pym/portage/util/env_update.py b/pym/portage/util/env_update.py
index 3dc84d4a1..d47c69e1c 100644
--- a/pym/portage/util/env_update.py
+++ b/pym/portage/util/env_update.py
@@ -46,7 +46,9 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None,
if prev_mtimes is None:
prev_mtimes = portage.mtimedb["ldpath"]
if env is None:
- env = os.environ
+ settings = os.environ
+ else:
+ settings = env
eprefix = env.get("EPREFIX", "")
eprefix_lstrip = eprefix.lstrip(os.sep)
@@ -245,9 +247,9 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None,
makelinks = False
ldconfig = "/sbin/ldconfig"
- if "CHOST" in env and "CBUILD" in env and \
- env["CHOST"] != env["CBUILD"]:
- ldconfig = find_binary("%s-ldconfig" % env["CHOST"])
+ if "CHOST" in settings and "CBUILD" in settings and \
+ settings["CHOST"] != settings["CBUILD"]:
+ ldconfig = find_binary("%s-ldconfig" % settings["CHOST"])
# Only run ldconfig as needed
if (ld_cache_update or makelinks) and ldconfig and not eprefix: