summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Luther <SebastianLuther@gmx.de>2010-08-20 08:24:05 +0200
committerZac Medico <zmedico@gentoo.org>2010-08-20 05:15:54 -0700
commit53c1043122c793c20245e0bacb38b1cd5ddcfe33 (patch)
tree78c8bcc5d7b81a3ab4bdfd9bfa3aa028f8ec63da
parentce6be8caaaba3151f6d7681180c21a6f2a756a40 (diff)
downloadportage-53c1043122c793c20245e0bacb38b1cd5ddcfe33.tar.gz
portage-53c1043122c793c20245e0bacb38b1cd5ddcfe33.tar.bz2
portage-53c1043122c793c20245e0bacb38b1cd5ddcfe33.zip
circular dependency handler: Small code clean ups
-rw-r--r--pym/_emerge/resolver/circular_dependency.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/pym/_emerge/resolver/circular_dependency.py b/pym/_emerge/resolver/circular_dependency.py
index 0930049d2..5029a7050 100644
--- a/pym/_emerge/resolver/circular_dependency.py
+++ b/pym/_emerge/resolver/circular_dependency.py
@@ -132,11 +132,11 @@ class circular_dependency_handler(object):
use_state = []
for flag in affecting_use:
use_state.append("disabled")
-
+
def _next_use_state(state, id=None):
if id is None:
id = len(state)-1
-
+
if id == 0 and state[0] == "enabled":
return False
@@ -171,6 +171,7 @@ class circular_dependency_handler(object):
flag in use:
solution.add((flag, False))
solutions.add(frozenset(solution))
+
if not _next_use_state(use_state):
break
@@ -190,7 +191,7 @@ class circular_dependency_handler(object):
followup_change = False
parent_parent_atoms = self.depgraph._dynamic_config._parent_atoms.get(changed_parent)
for ppkg, atom in parent_parent_atoms:
-
+
atom = atom.unevaluated_atom
if not atom.use:
continue
@@ -222,6 +223,6 @@ class circular_dependency_handler(object):
if followup_change:
msg += " (This change might require USE changes on parent packages.)"
suggestions.append(msg)
- final_solutions.setdefault(pkg, set()).add(frozenset(solution))
-
+ final_solutions.setdefault(pkg, set()).add(solution)
+
return final_solutions, suggestions