summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-04-30 07:31:50 +0000
committerZac Medico <zmedico@gentoo.org>2009-04-30 07:31:50 +0000
commitc2763e3be2552f19f79e6b80bfc05f3478306836 (patch)
tree743f332319845feddd385887372e1a6ba7e17c0f
parentGenerate a pruned version of ACCEPT_LICENSE, by intersection with (diff)
downloadportage-multirepo-c2763e3be2552f19f79e6b80bfc05f3478306836.tar.gz
portage-multirepo-c2763e3be2552f19f79e6b80bfc05f3478306836.tar.bz2
portage-multirepo-c2763e3be2552f19f79e6b80bfc05f3478306836.zip
In config.setcpv(), move the code that makes sure "pkg" values override "env"
values _after_ the reset() call. (trunk r13418) svn path=/main/branches/2.1.6/; revision=13558
-rw-r--r--pym/portage/__init__.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 785498e7..e734f9ad 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -2205,7 +2205,6 @@ class config(object):
cpv_slot = self.mycpv
pkginternaluse = ""
iuse = ""
- env_configdict = self.configdict["env"]
pkg_configdict = self.configdict["pkg"]
previous_iuse = pkg_configdict.get("IUSE")
@@ -2231,9 +2230,6 @@ class config(object):
repository = pkg_configdict.pop("repository", None)
if repository is not None:
pkg_configdict["PORTAGE_REPO_NAME"] = repository
- for k in pkg_configdict:
- if k != "USE":
- env_configdict.pop(k, None)
slot = pkg_configdict["SLOT"]
iuse = pkg_configdict["IUSE"]
if pkg is None:
@@ -2303,6 +2299,14 @@ class config(object):
if has_changed:
self.reset(keeping_pkg=1,use_cache=use_cache)
+ # Ensure that "pkg" values are always preferred over "env" values.
+ # This must occur _after_ the above reset() call, since reset()
+ # copies values from self.backupenv.
+ env_configdict = self.configdict['env']
+ for k in pkg_configdict:
+ if k != 'USE':
+ env_configdict.pop(k, None)
+
env_configdict.addLazySingleton('ACCEPT_LICENSE',
self._lazy_accept_license(self))