summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-06-29 19:09:46 -0700
committerZac Medico <zmedico@gentoo.org>2011-06-29 19:09:46 -0700
commitd0c628f34a1789e3fc9e41c2cbc69926e8ada7b9 (patch)
treee6d7c0fd3489a6ccb649e7afda26e4cd33b8e75c
parenta1d16a01c4ca0b2b196e9256b4f309157c5545fd (diff)
downloadportage-d0c628f34a1789e3fc9e41c2cbc69926e8ada7b9.tar.gz
portage-d0c628f34a1789e3fc9e41c2cbc69926e8ada7b9.tar.bz2
portage-d0c628f34a1789e3fc9e41c2cbc69926e8ada7b9.zip
config.setcpv(): simplify repo_env code
-rw-r--r--pym/portage/package/ebuild/config.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 19277d709..d553a7bc2 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1127,7 +1127,6 @@ class config(object):
has_changed = True
repo_env = []
- repo_env_empty = True
if repository and repository != Package.UNKNOWN_REPO:
repos = []
try:
@@ -1146,7 +1145,6 @@ class config(object):
d = d.copy()
for k in self._global_only_vars:
d.pop(k, None)
- repo_env.append(d)
cpdict = self._use_manager._repo_puse_dict.get(repo, {}).get(cp)
if cpdict:
repo_puse = ordered_by_atom_specificity(cpdict, pkg)
@@ -1154,9 +1152,9 @@ class config(object):
for x in repo_puse:
d["USE"] = d.get("USE", "") + " " + " ".join(x)
if d:
- repo_env_empty = False
+ repo_env.append(d)
- if not repo_env_empty or self.configdict["repo"]:
+ if repo_env or self.configdict["repo"]:
self.configdict["repo"].clear()
self.configdict["repo"].update(stack_dicts(repo_env,
incrementals=self.incrementals))