summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-09 17:55:09 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-09 17:55:09 +0000
commit53d7da8137cb1395d4bdc17c2326056f1e8f2e81 (patch)
tree42a5938310965aa2ae3e25527a06def7d684685a
parentb4f0dca9b0c6928d3557a7fbe696dacc7faa1735 (diff)
downloadportage-53d7da8137cb1395d4bdc17c2326056f1e8f2e81.tar.gz
portage-53d7da8137cb1395d4bdc17c2326056f1e8f2e81.tar.bz2
portage-53d7da8137cb1395d4bdc17c2326056f1e8f2e81.zip
When pruning the list of parents for the slot collision display, always
show parents that themselves have been pulled into collision slots, since those are more relevant that others. (branches/2.1.2 r9773) svn path=/main/trunk/; revision=9774
-rw-r--r--pym/_emerge/__init__.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index ba0c8a165..e3f8df792 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -1621,16 +1621,25 @@ class depgraph(object):
for parent in parents:
if isinstance(parent, DependencyArg):
pruned_list.append(parent)
- if len(pruned_list) == max_parents:
- break
+ # Prefer Packages instances that themselves have been
+ # pulled into collision slots.
+ for parent in parents:
+ if isinstance(parent, Package) and \
+ (parent.slot_atom, parent.root) \
+ in self._slot_collision_info:
+ pruned_list.append(parent)
for parent in parents:
if not isinstance(parent, DependencyArg):
pruned_list.append(parent)
- if len(pruned_list) == max_parents:
+ if len(pruned_list) >= max_parents:
break
parents = pruned_list
msg.append(" pulled in by\n")
+ shown_parents = set()
for parent in parents:
+ if parent in shown_parents:
+ continue
+ shown_parents.add(parent)
msg.append(2*indent)
msg.append(str(parent))
msg.append("\n")