From: Zac Medico Date: Wed, 4 Oct 2006 05:09:30 +0000 (-0000) Subject: When gathering a group of nodes to merge (with circular RDEPEND), make sure not to... X-Git-Tag: v2.1.2~718 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=115bc9dddbd95d73de254a84a8017372ccb24e31;p=portage.git 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 --- 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:"