From: Zac Medico Date: Sat, 10 Jan 2009 22:26:11 +0000 (-0000) Subject: When displaying parents of unsolved blockers, reduce noise by pruning packages X-Git-Tag: v2.2_rc21~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4bea9a9cb276cf0de9e29cbaabf5fae50ea1e5f1;p=portage.git When displaying parents of unsolved blockers, reduce noise by pruning packages that are only pulled in by other conflict packages. svn path=/main/trunk/; revision=12420 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 5185298c5..6e0d4e49c 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -7239,6 +7239,21 @@ class depgraph(object): if parent_atoms: conflict_pkgs[pkg] = parent_atoms + if conflict_pkgs: + # Reduce noise by pruning packages that are only + # pulled in by other conflict packages. + pruned_pkgs = set() + for pkg, parent_atoms in conflict_pkgs.iteritems(): + relevant_parent = False + for parent, atom in parent_atoms: + if parent not in conflict_pkgs: + relevant_parent = True + break + if not relevant_parent: + pruned_pkgs.add(pkg) + for pkg in pruned_pkgs: + del conflict_pkgs[pkg] + if conflict_pkgs: msg = [] msg.append("\n")