From: Zac Medico Date: Thu, 30 Jun 2011 02:09:46 +0000 (-0700) Subject: config.setcpv(): simplify repo_env code X-Git-Tag: v2.2.0_alpha42~17 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d0c628f34a1789e3fc9e41c2cbc69926e8ada7b9;p=portage.git config.setcpv(): simplify repo_env code --- 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))