summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-16 02:04:19 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-16 02:04:19 +0000
commit30052a08065650154917870f367fd574620d75fc (patch)
treed3f40a3bdf47a948e26a0e66b822aa9bf41d708b
parent3cf983b2c3aa9c13e151ad25c8f8aa77d56c9223 (diff)
downloadportage-30052a08065650154917870f367fd574620d75fc.tar.gz
portage-30052a08065650154917870f367fd574620d75fc.tar.bz2
portage-30052a08065650154917870f367fd574620d75fc.zip
For bug #157897, show parent nodes in order to help the user decide about what action to take.
svn path=/main/trunk/; revision=5297
-rwxr-xr-xbin/emerge23
1 files changed, 16 insertions, 7 deletions
diff --git a/bin/emerge b/bin/emerge
index 020682894..d5e136feb 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -862,9 +862,15 @@ class depgraph:
"package slot have been "
print "!!! pulled into the dependency graph:"
print
- for cpv in packages:
- print " ", cpv
- print
+ for node, parents in packages:
+ print node,
+ if parents:
+ print "pulled in by"
+ for parent in parents:
+ print " ", parent
+ else:
+ print "(no parents)"
+ print
msg = []
msg.append("It may be possible to solve this problem ")
@@ -1000,7 +1006,13 @@ class depgraph:
priority=priority)
return 1
else:
- self._show_slot_collision_notice((mykey, e_cpv))
+ e_parents = self.digraph.parent_nodes(existing_node)
+ myparents = []
+ if myparent:
+ myparents.append(myparent)
+ self._show_slot_collision_notice(
+ ((tuple(mybigkey), myparents),
+ (existing_node, e_parents)))
return 0
jbigkey = tuple(mybigkey)
@@ -1497,9 +1509,6 @@ class depgraph:
# The existing node can be reused.
selected_pkg = [e_type, myroot, e_cpv,
self.useFlags[myroot][e_cpv]]
- else:
- self._show_slot_collision_notice((mycpv, e_cpv))
- return 0
if myparent:
#we are a dependency, so we want to be unconditionally added