summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-01-10 22:26:11 +0000
committerZac Medico <zmedico@gentoo.org>2009-01-10 22:26:11 +0000
commit4bea9a9cb276cf0de9e29cbaabf5fae50ea1e5f1 (patch)
tree266f34c4cdd1d00da16caaac21e0740a5234e766
parentde7c932190ef7437c5e4c845b8390b1757a783e5 (diff)
downloadportage-4bea9a9cb276cf0de9e29cbaabf5fae50ea1e5f1.tar.gz
portage-4bea9a9cb276cf0de9e29cbaabf5fae50ea1e5f1.tar.bz2
portage-4bea9a9cb276cf0de9e29cbaabf5fae50ea1e5f1.zip
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
-rw-r--r--pym/_emerge/__init__.py15
1 files changed, 15 insertions, 0 deletions
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
@@ -7240,6 +7240,21 @@ class depgraph(object):
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")
indent = " "