From 35d900fab79b934517a2bf611bd919cb6a99aa7d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 29 Aug 2011 00:40:11 -0700 Subject: 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. --- pym/portage/util/env_update.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 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 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: -- cgit v1.2.3-1-g7c22