From 1020336c192ee7aa7c15696b61846af74a00b6a5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 9 Apr 2008 17:54:24 +0000 Subject: [PATCH] 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. svn path=/main/branches/2.1.2/; revision=9773 --- bin/emerge | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/bin/emerge b/bin/emerge index eab47a44d..dd3f1e7e4 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1760,16 +1760,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") -- 2.26.2