From: Zac Medico Date: Mon, 12 Jan 2009 08:27:18 +0000 (-0000) Subject: When displaying parents of unsolved blockers, reduce noise by pruning packages X-Git-Tag: v2.1.6.5~11 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=980eed3f36cdff6ec6e7c06a8a3d8b8e480746c0;p=portage.git When displaying parents of unsolved blockers, reduce noise by pruning packages that are only pulled in by other conflict packages. (trunk r12420) svn path=/main/branches/2.1.6/; revision=12476 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index bb9dac73f..4f292ea41 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -7223,6 +7223,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")