Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13558 - main/branches/2.1.6/pym/portage
Date: Thu, 30 Apr 2009 07:31:52
Message-Id: E1LzQkI-0002cN-P4@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-04-30 07:31:50 +0000 (Thu, 30 Apr 2009)
3 New Revision: 13558
4
5 Modified:
6 main/branches/2.1.6/pym/portage/__init__.py
7 Log:
8 In config.setcpv(), move the code that makes sure "pkg" values override "env"
9 values _after_ the reset() call. (trunk r13418)
10
11 Modified: main/branches/2.1.6/pym/portage/__init__.py
12 ===================================================================
13 --- main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 07:31:39 UTC (rev 13557)
14 +++ main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 07:31:50 UTC (rev 13558)
15 @@ -2205,7 +2205,6 @@
16 cpv_slot = self.mycpv
17 pkginternaluse = ""
18 iuse = ""
19 - env_configdict = self.configdict["env"]
20 pkg_configdict = self.configdict["pkg"]
21 previous_iuse = pkg_configdict.get("IUSE")
22
23 @@ -2231,9 +2230,6 @@
24 repository = pkg_configdict.pop("repository", None)
25 if repository is not None:
26 pkg_configdict["PORTAGE_REPO_NAME"] = repository
27 - for k in pkg_configdict:
28 - if k != "USE":
29 - env_configdict.pop(k, None)
30 slot = pkg_configdict["SLOT"]
31 iuse = pkg_configdict["IUSE"]
32 if pkg is None:
33 @@ -2303,6 +2299,14 @@
34 if has_changed:
35 self.reset(keeping_pkg=1,use_cache=use_cache)
36
37 + # Ensure that "pkg" values are always preferred over "env" values.
38 + # This must occur _after_ the above reset() call, since reset()
39 + # copies values from self.backupenv.
40 + env_configdict = self.configdict['env']
41 + for k in pkg_configdict:
42 + if k != 'USE':
43 + env_configdict.pop(k, None)
44 +
45 env_configdict.addLazySingleton('ACCEPT_LICENSE',
46 self._lazy_accept_license(self))