summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-05-09 02:28:54 +0000
committerZac Medico <zmedico@gentoo.org>2008-05-09 02:28:54 +0000
commitb351b67f3be5154a217a3210f253c3760c55c165 (patch)
tree898be5c5cb9702044e0d7069c66bb7bec8a548a1 /pym
parent183829c5620a02d43057cc0b2b6b395bb75550b1 (diff)
downloadportage-b351b67f3be5154a217a3210f253c3760c55c165.tar.gz
portage-b351b67f3be5154a217a3210f253c3760c55c165.tar.bz2
portage-b351b67f3be5154a217a3210f253c3760c55c165.zip
Allow scheduled uninstalls to be selected the same way as other leaf nodes.
svn path=/main/trunk/; revision=10258
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/__init__.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 2dc0b907f..ea1bec3fa 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -3617,7 +3617,8 @@ class depgraph(object):
"""
return [node for node in mygraph.leaf_nodes(**kwargs) \
if isinstance(node, Package) and \
- node.operation != "uninstall"]
+ (node.operation != "uninstall" or \
+ node in scheduled_uninstalls)]
# sys-apps/portage needs special treatment if ROOT="/"
running_root = "/"
@@ -3814,13 +3815,6 @@ class depgraph(object):
selected_nodes = list(selected_nodes)
selected_nodes.sort(cmp_circular_bias)
- if not selected_nodes and scheduled_uninstalls:
- selected_nodes = set()
- for node in scheduled_uninstalls:
- if not mygraph.child_nodes(node):
- selected_nodes.add(node)
- scheduled_uninstalls.difference_update(selected_nodes)
-
if not selected_nodes and not myblocker_uninstalls.is_empty():
# An Uninstall task needs to be executed in order to
# avoid conflict if possible.
@@ -4004,6 +3998,7 @@ class depgraph(object):
"uninstall" == node.operation:
have_uninstall_task = True
uninst_task = node
+ scheduled_uninstalls.remove(uninst_task)
else:
vardb = self.trees[node.root]["vartree"].dbapi
previous_cpv = vardb.match(node.slot_atom)