From: Zac Medico Date: Mon, 29 Aug 2011 07:40:11 +0000 (-0700) Subject: env_update: fix CHOST/CBUILD ldconfig code X-Git-Tag: v2.2.0_alpha52~35 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=35d900fab79b934517a2bf611bd919cb6a99aa7d;p=portage.git 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. --- 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: