summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: