diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-10-04 05:09:30 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-10-04 05:09:30 +0000 |
commit | 115bc9dddbd95d73de254a84a8017372ccb24e31 (patch) | |
tree | fce9d629a3520b2c2fb7b807df297f2f38eafeb9 | |
parent | 4ec25470b38f38855e978ce1eee65a7b918d8265 (diff) | |
download | portage-115bc9dddbd95d73de254a84a8017372ccb24e31.tar.gz portage-115bc9dddbd95d73de254a84a8017372ccb24e31.tar.bz2 portage-115bc9dddbd95d73de254a84a8017372ccb24e31.zip |
When gathering a group of nodes to merge (with circular RDEPEND), make sure not to prematurely merge any nodes that have unsatisfied hard deps.
svn path=/main/trunk/; revision=4586
-rwxr-xr-x | bin/emerge | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/bin/emerge b/bin/emerge index c191b4b61..bd3ca3e2d 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1273,15 +1273,26 @@ class depgraph: """Recursively gather a group of nodes that RDEPEND on eachother. This ensures that they are merged as a group and get their RDEPENDs satisfied as soon as possible.""" - selected_nodes = set() - def gather_deps(node): + def gather_deps(mergeable_nodes, selected_nodes, node): if node in selected_nodes: - return + return True + if node not in mergeable_nodes: + return False selected_nodes.add(node) for child in mygraph.child_nodes(node, ignore_priority=digraph.SOFT): - gather_deps(child) - gather_deps(nodes[0]) + if not gather_deps( + mergeable_nodes, selected_nodes, child): + return False + return True + mergeable_nodes = set(nodes) + for node in nodes: + selected_nodes = set() + if gather_deps( + mergeable_nodes, selected_nodes, node): + break + else: + selected_nodes = None if not selected_nodes: print "!!! Error: circular dependencies:" |