summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-29 13:43:08 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-29 13:43:08 -0700
commit1fdbe21dc4694d02e3ccab940478b52ff627fc20 (patch)
tree4c949aa15634cb3804a6d48a74ae6a01a0795c81
parent4dc0f843161f857be388af141cddf5c7b0b3d567 (diff)
downloadportage-1fdbe21dc4694d02e3ccab940478b52ff627fc20.tar.gz
portage-1fdbe21dc4694d02e3ccab940478b52ff627fc20.tar.bz2
portage-1fdbe21dc4694d02e3ccab940478b52ff627fc20.zip
Tweak depgraph._show_unsatisfied_dep() display for AtomArg instances.
-rw-r--r--pym/_emerge/depgraph.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 69422f963..857e6df20 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2122,6 +2122,8 @@ class depgraph(object):
xinfo = '"%s"' % atom.unevaluated_atom
if arg:
xinfo='"%s"' % arg
+ if isinstance(myparent, AtomArg):
+ xinfo = _unicode_decode('"%s"') % (myparent,)
# Discard null/ from failed cpv_expand category expansion.
xinfo = xinfo.replace("null/", "")
masked_packages = []
@@ -2375,6 +2377,12 @@ class depgraph(object):
# Show parent nodes and the argument that pulled them in.
traversed_nodes = set()
node = myparent
+ if isinstance(myparent, AtomArg):
+ # It's redundant to show parent for AtomArg since
+ # it's the same as 'xinfo' displayed above.
+ node = None
+ else:
+ node = myparent
msg = []
while node is not None:
traversed_nodes.add(node)
@@ -2408,8 +2416,9 @@ class depgraph(object):
else:
selected_parent = parent
node = selected_parent
- writemsg_stdout("\n".join(msg), noiselevel=-1)
- writemsg_stdout("\n", noiselevel=-1)
+ if msg:
+ writemsg_stdout("\n".join(msg), noiselevel=-1)
+ writemsg_stdout("\n", noiselevel=-1)
if mask_docs:
show_mask_docs()