summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-09 18:04:10 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-09 18:04:10 +0000
commit49ba65a096cb05d0c7f25e6bc47c5d48d037ad6f (patch)
treeae4ac81dcb93fed8918615c12dc02b29d6c48fd8
parent53d7da8137cb1395d4bdc17c2326056f1e8f2e81 (diff)
downloadportage-49ba65a096cb05d0c7f25e6bc47c5d48d037ad6f.tar.gz
portage-49ba65a096cb05d0c7f25e6bc47c5d48d037ad6f.tar.bz2
portage-49ba65a096cb05d0c7f25e6bc47c5d48d037ad6f.zip
Fix minor issues in the calculation of the number of parents omitted from
the slot collision display. svn path=/main/trunk/; revision=9775
-rw-r--r--pym/_emerge/__init__.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index e3f8df792..f6532a0b6 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -1614,7 +1614,6 @@ class depgraph(object):
if parents:
omitted_parents = 0
if len(parents) > max_parents:
- omitted_parents = len(parents) - max_parents
pruned_list = []
# When generating the pruned list, prefer instances
# of DependencyArg over instances of Package.
@@ -1629,17 +1628,15 @@ class depgraph(object):
in self._slot_collision_info:
pruned_list.append(parent)
for parent in parents:
- if not isinstance(parent, DependencyArg):
+ if len(pruned_list) >= max_parents:
+ break
+ if not isinstance(parent, DependencyArg) and \
+ parent not in pruned_list:
pruned_list.append(parent)
- if len(pruned_list) >= max_parents:
- break
+ omitted_parents = len(parents) - len(pruned_list)
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")