Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/
Date: Mon, 29 Aug 2011 07:40:47
Message-Id: 35d900fab79b934517a2bf611bd919cb6a99aa7d.zmedico@gentoo
1 commit: 35d900fab79b934517a2bf611bd919cb6a99aa7d
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 29 07:40:11 2011 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 29 07:40:11 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=35d900fa
7
8 env_update: fix CHOST/CBUILD ldconfig code
9
10 This code never worked (since it was added in commit
11 751893b0272561eb9274110a474d5436a7d2bc76) due to a name collision
12 between the env argument and another variable with the same name.
13
14 ---
15 pym/portage/util/env_update.py | 10 ++++++----
16 1 files changed, 6 insertions(+), 4 deletions(-)
17
18 diff --git a/pym/portage/util/env_update.py b/pym/portage/util/env_update.py
19 index 3dc84d4..d47c69e 100644
20 --- a/pym/portage/util/env_update.py
21 +++ b/pym/portage/util/env_update.py
22 @@ -46,7 +46,9 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None,
23 if prev_mtimes is None:
24 prev_mtimes = portage.mtimedb["ldpath"]
25 if env is None:
26 - env = os.environ
27 + settings = os.environ
28 + else:
29 + settings = env
30
31 eprefix = env.get("EPREFIX", "")
32 eprefix_lstrip = eprefix.lstrip(os.sep)
33 @@ -245,9 +247,9 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None,
34 makelinks = False
35
36 ldconfig = "/sbin/ldconfig"
37 - if "CHOST" in env and "CBUILD" in env and \
38 - env["CHOST"] != env["CBUILD"]:
39 - ldconfig = find_binary("%s-ldconfig" % env["CHOST"])
40 + if "CHOST" in settings and "CBUILD" in settings and \
41 + settings["CHOST"] != settings["CBUILD"]:
42 + ldconfig = find_binary("%s-ldconfig" % settings["CHOST"])
43
44 # Only run ldconfig as needed
45 if (ld_cache_update or makelinks) and ldconfig and not eprefix: