From ca46312928473ffe22740498aca6891ef623497c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 2 Oct 2006 22:08:04 +0000 Subject: Fix depgraph.altlist() so that it can identify a group of nodes that completely satisfy eachothers non-soft deps. This should complete the fix for bug #149881. svn path=/main/trunk/; revision=4572 --- pym/portage.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pym') diff --git a/pym/portage.py b/pym/portage.py index f3de6d9e3..620ef06bd 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -375,9 +375,15 @@ class digraph: """Return a list of all nodes in the graph""" return self.order[:] - def child_nodes(self, node): + def child_nodes(self, node, ignore_priority=-1): """Return all children of the specified node""" - return self.nodes[node][0].keys() + if ignore_priority == -1: + return self.nodes[node][0].keys() + children = [] + for child, priority in self.nodes[node][0].iteritems(): + if priority > ignore_priority: + children.append(child) + return children def parent_nodes(self, node): """Return all parents of the specified node""" -- cgit v1.2.3-1-g7c22