diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-05-10 18:17:11 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-05-10 18:17:11 +0000 |
commit | 9daa7570d88dccd869ac90abadf85f9d6a6eb701 (patch) | |
tree | 0f9ed5e580a9b132479e46b1812b83265463f758 /bin/emerge | |
parent | ef3ebc98b37e274ef64e10279de51a157ee3c681 (diff) | |
download | portage-9daa7570d88dccd869ac90abadf85f9d6a6eb701.tar.gz portage-9daa7570d88dccd869ac90abadf85f9d6a6eb701.tar.bz2 portage-9daa7570d88dccd869ac90abadf85f9d6a6eb701.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.
(trunk r10286)
svn path=/main/branches/2.1.2/; revision=10287
Diffstat (limited to 'bin/emerge')
-rwxr-xr-x | bin/emerge | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/bin/emerge b/bin/emerge index 91618ecc9..44a3fceae 100755 --- a/bin/emerge +++ b/bin/emerge @@ -4398,6 +4398,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) @@ -4434,8 +4438,15 @@ class depgraph(object): if parent != inst_pkg: mygraph.add(blocker, parent) - tree = "--tree" in self.myopts - + # 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 |