diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-07-02 03:40:07 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-07-02 03:40:07 +0000 |
commit | 3421ab8a450463c1a533856469c854e810e1f8c2 (patch) | |
tree | 8255ed5ade25465d811c1fe90b5a2fb4835ba952 /bin | |
parent | ed822428db0afacb6670b262de9ff398632fb512 (diff) | |
download | portage-3421ab8a450463c1a533856469c854e810e1f8c2.tar.gz portage-3421ab8a450463c1a533856469c854e810e1f8c2.tar.bz2 portage-3421ab8a450463c1a533856469c854e810e1f8c2.zip |
Clean up the selected_nodes logic in depgraph.altlist(). (trunk r7122)
svn path=/main/branches/2.1.2/; revision=7123
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/emerge | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/bin/emerge b/bin/emerge index f84260f51..618433e60 100755 --- a/bin/emerge +++ b/bin/emerge @@ -2063,13 +2063,12 @@ class depgraph: if "portage" == portage.catsplit(portage.dep_getkey(cpv))[-1]: asap_nodes.append(node) break - ignore_priority_range = [None] - ignore_priority_range.extend( + ignore_priority_soft_range = [None] + ignore_priority_soft_range.extend( xrange(DepPriority.MIN, DepPriority.SOFT + 1)) tree_mode = "--tree" in self.myopts while not mygraph.empty(): - ignore_priority = None - nodes = None + selected_nodes = None if asap_nodes: """ASAP nodes are merged before their soft deps.""" for node in asap_nodes: @@ -2078,17 +2077,15 @@ class depgraph: continue if not mygraph.child_nodes(node, ignore_priority=DepPriority.SOFT): - nodes = [node] + selected_nodes = [node] asap_nodes.remove(node) break - if not nodes: - for ignore_priority in ignore_priority_range: + if not selected_nodes: + for ignore_priority in ignore_priority_soft_range: nodes = get_nodes(ignore_priority=ignore_priority) if nodes: break - selected_nodes = None - if nodes: - if ignore_priority <= DepPriority.SOFT: + if nodes: if ignore_priority is None and not tree_mode: # Greedily pop all of these nodes since no relationship # has been ignored. This optimization destroys --tree @@ -2107,7 +2104,7 @@ class depgraph: if not selected_nodes: # settle for a root node selected_nodes = [nodes[0]] - if not nodes: + if not selected_nodes: nodes = get_nodes(ignore_priority=DepPriority.MEDIUM) if nodes: """Recursively gather a group of nodes that RDEPEND on |