summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-05-10 18:12:44 +0000
committerZac Medico <zmedico@gentoo.org>2008-05-10 18:12:44 +0000
commit3909f8474145da74ae67734cb7a3a2a498df672c (patch)
tree3bf9689924e39d81969ce0c93f59887ee01bb85f /pym
parent735da3fef8363def2fb66968814cf725afd2b5bf (diff)
downloadportage-3909f8474145da74ae67734cb7a3a2a498df672c.tar.gz
portage-3909f8474145da74ae67734cb7a3a2a498df672c.tar.bz2
portage-3909f8474145da74ae67734cb7a3a2a498df672c.zip
If the uninstall task did not need to be executed because
of an upgrade, display Blocker -> Upgrade edges since the corresponding Blocker -> Uninstall edges will not be shown. svn path=/main/trunk/; revision=10286
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/__init__.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index f4ce23843..1609700b5 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -4246,6 +4246,10 @@ class depgraph(object):
# If there are any Uninstall instances, add the corresponding
# blockers to the digraph (useful for --tree display).
+
+ executed_uninstalls = set(node for node in mylist \
+ if isinstance(node, Package) and node.operation == "unmerge")
+
for uninstall in self._blocker_uninstalls.leaf_nodes():
uninstall_parents = \
self._blocker_uninstalls.parent_nodes(uninstall)
@@ -4282,6 +4286,16 @@ class depgraph(object):
if parent != inst_pkg:
mygraph.add(blocker, parent)
+ # If the uninstall task did not need to be executed because
+ # of an upgrade, display Blocker -> Upgrade edges since the
+ # corresponding Blocker -> Uninstall edges will not be shown.
+ upgrade_node = \
+ self._slot_pkg_map[uninstall.root].get(uninstall.slot_atom)
+ if upgrade_node is not None and \
+ uninstall not in executed_uninstalls:
+ for blocker in uninstall_parents:
+ mygraph.add(upgrade_node, blocker)
+
unsatisfied_blockers = []
i = 0
depth = 0