diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-10-02 22:08:04 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-10-02 22:08:04 +0000 |
commit | ca46312928473ffe22740498aca6891ef623497c (patch) | |
tree | 080ab72aa3217fa768fcd5023eb76d24ff7157f8 /pym | |
parent | bdfdb9a8caafd9e760176f298d016ce233f98d9c (diff) | |
download | portage-ca46312928473ffe22740498aca6891ef623497c.tar.gz portage-ca46312928473ffe22740498aca6891ef623497c.tar.bz2 portage-ca46312928473ffe22740498aca6891ef623497c.zip |
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
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage.py | 10 |
1 files changed, 8 insertions, 2 deletions
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""" |