diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-05-10 08:35:41 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-05-10 08:35:41 +0000 |
commit | adba0cd0bbe986bd851a33f8e057c1baea6c62c7 (patch) | |
tree | ef3fbfa7e9d7e8584882c6b362c2673af0c69491 /bin | |
parent | 3b96a315473cb4d06f6ee432370328b14b78ea8e (diff) | |
download | portage-adba0cd0bbe986bd851a33f8e057c1baea6c62c7.tar.gz portage-adba0cd0bbe986bd851a33f8e057c1baea6c62c7.tar.bz2 portage-adba0cd0bbe986bd851a33f8e057c1baea6c62c7.zip |
When selecting leaf nodes, if there is a mix of merge and uninstall
nodes, save the uninstall nodes from later since sometimes a merge
node will render an install node unnecessary, and we want to avoid
doing a separate uninstall task in that case. (trunk r10279)
svn path=/main/branches/2.1.2/; revision=10280
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/emerge | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bin/emerge b/bin/emerge index 6cefe9bcb..0ab37b6c5 100755 --- a/bin/emerge +++ b/bin/emerge @@ -3864,8 +3864,18 @@ class depgraph(object): 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 - # output, so it's disabled in reversed mode. - selected_nodes = nodes + # output, so it's disabled in reversed mode. If there + # is a mix of merge and uninstall nodes, save the + # uninstall nodes from later since sometimes a merge + # node will render an install node unnecessary, and + # we want to avoid doing a separate uninstall task in + # that case. + merge_nodes = [node for node in nodes \ + if node.operation == "merge"] + if merge_nodes: + selected_nodes = merge_nodes + else: + selected_nodes = nodes else: # For optimal merge order: # * Only pop one node. |