summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-29 11:10:28 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-29 11:10:28 +0000
commit0137f024d61343de565026fbed098bee5bda6a08 (patch)
tree303f9cceab0065baccf4d54c26aeef947f1964e3
parent30aadb44dcbab33e70d09497533e0a0f8cb3706a (diff)
downloadportage-0137f024d61343de565026fbed098bee5bda6a08.tar.gz
portage-0137f024d61343de565026fbed098bee5bda6a08.tar.bz2
portage-0137f024d61343de565026fbed098bee5bda6a08.zip
For bug #159310, don't show a slot collision notice if there are unresolvable blockers.
svn path=/main/trunk/; revision=5413
-rwxr-xr-xbin/emerge32
1 files changed, 28 insertions, 4 deletions
diff --git a/bin/emerge b/bin/emerge
index 92832317e..872dd1b3f 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1010,6 +1010,7 @@ class depgraph:
self.args_keys = []
self.blocker_digraph = digraph()
self.blocker_parents = {}
+ self._slot_collision_info = []
self._altlist_cache = {}
self._pprovided_args = []
@@ -1176,15 +1177,30 @@ class depgraph:
priority=priority)
return 1
else:
+ # A slot collision has occurred. Sometimes this coincides
+ # with unresolvable blockers, so the slot collision will be
+ # shown later if there are no unresolvable blockers.
e_parents = self._parent_child_digraph.parent_nodes(
existing_node)
myparents = []
if myparent:
myparents.append(myparent)
- self._show_slot_collision_notice(
- ((jbigkey, myparents),
- (existing_node, e_parents)))
- return 0
+ self._slot_collision_info.append(
+ ((jbigkey, myparents), (existing_node, e_parents)))
+
+ # Now add this node to the graph so that self.display()
+ # can work with it show use flags and --tree output.
+ self.useFlags[myroot][mykey] = myuse
+ self._parent_child_digraph.add(jbigkey, myparent)
+ if rev_dep and myparent:
+ self.digraph.add(myparent, jbigkey,
+ priority=priority)
+ else:
+ self.digraph.add(jbigkey, myparent,
+ priority=priority)
+ # The slot collision has rendered the graph invalid, so
+ # there's no need to process dependencies of this node.
+ return 1
self._slot_node_map[myroot][slot_atom] = jbigkey
self.pkg_node_map[myroot][mykey] = jbigkey
@@ -1905,6 +1921,14 @@ class depgraph:
# Validate blockers that depend on merge order.
if not self.blocker_digraph.empty():
self.altlist()
+ if self._slot_collision_info:
+ # The user is only notified of a slot collision if there are no
+ # unresolvable blocks.
+ for x in self.altlist():
+ if x[0] == "blocks":
+ return True
+ self._show_slot_collision_notice(self._slot_collision_info[0])
+ return False
return True
def altlist(self, reversed=False):