From: Sebastian Luther Date: Sat, 22 May 2010 18:47:16 +0000 (+0200) Subject: _emerge.depgraph._show_slot_collision_notice(): Improve atom list prunning X-Git-Tag: v2.2_rc68~582 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9de5f67676f1b45a4e68830ee3716bbff10a2f00;p=portage.git _emerge.depgraph._show_slot_collision_notice(): Improve atom list prunning --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index efc22e8de..c8b460396 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -481,12 +481,18 @@ class depgraph(object): parent_atoms = self._dynamic_config._parent_atoms.get(node) if parent_atoms: pruned_list = set() - # Prefer conflict atoms over others. - for parent_atom in parent_atoms: - if len(pruned_list) >= max_parents: - break - if parent_atom in self._dynamic_config._slot_conflict_parent_atoms: - pruned_list.add(parent_atom) + for pkg, atom in parent_atoms: + num_matched_slot_atoms = 0 + atom_set = InternalPackageSet(initial_atoms=(atom,)) + for other_node in slot_nodes: + if other_node == node: + continue + if atom_set.findAtomForPackage(other_node): + num_matched_slot_atoms += 1 + if num_matched_slot_atoms < len(slot_nodes) - 1: + pruned_list.add((pkg, atom)) + if len(pruned_list) >= max_parents: + break # If this package was pulled in by conflict atoms then # show those alone since those are the most interesting.