summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-03 08:00:07 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-03 08:00:07 +0000
commit5a0e91c290dad87f14feb1bb0d67557944634953 (patch)
treece34e9995d5e12a287710890990e2bc57fcecc25 /pym
parentc5bf4898b5647052fa784583b38248ee31dca5c7 (diff)
downloadportage-5a0e91c290dad87f14feb1bb0d67557944634953.tar.gz
portage-5a0e91c290dad87f14feb1bb0d67557944634953.tar.bz2
portage-5a0e91c290dad87f14feb1bb0d67557944634953.zip
Bug #245358 - For unsatisfied dependencies, display the parent nodes and the
argument that pulled them in. svn path=/main/trunk/; revision=11805
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/__init__.py24
1 files changed, 18 insertions, 6 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 6cf6ddc22..f65fda5dc 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -5288,10 +5288,6 @@ class depgraph(object):
xinfo='"%s"' % arg
# Discard null/ from failed cpv_expand category expansion.
xinfo = xinfo.replace("null/", "")
- if myparent:
- xfrom = '(dependency required by '+ \
- green('"%s"' % myparent[2]) + \
- red(' [%s]' % myparent[0]) + ')'
masked_packages = []
missing_use = []
missing_licenses = []
@@ -5386,8 +5382,24 @@ class depgraph(object):
show_mask_docs()
else:
print "\nemerge: there are no ebuilds to satisfy "+green(xinfo)+"."
- if myparent:
- print xfrom
+
+ # Show parent nodes and the argument that pulled them in.
+ node = myparent
+ msg = []
+ while node is not None:
+ msg.append('(dependency required by "%s" [%s])' % \
+ (colorize('INFORM', str(node.cpv)), node.type_name))
+ parent = None
+ for parent in self.digraph.parent_nodes(node):
+ if isinstance(parent, DependencyArg):
+ msg.append('(dependency required by "%s" [argument])' % \
+ (colorize('INFORM', str(parent))))
+ parent = None
+ break
+ node = parent
+ for line in msg:
+ print line
+
print
def _select_pkg_highest_available(self, root, atom, onlydeps=False):