1 |
Author: zmedico |
2 |
Date: 2008-11-03 08:00:07 +0000 (Mon, 03 Nov 2008) |
3 |
New Revision: 11805 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/_emerge/__init__.py |
7 |
Log: |
8 |
Bug #245358 - For unsatisfied dependencies, display the parent nodes and the |
9 |
argument that pulled them in. |
10 |
|
11 |
|
12 |
Modified: main/trunk/pym/_emerge/__init__.py |
13 |
=================================================================== |
14 |
--- main/trunk/pym/_emerge/__init__.py 2008-11-03 06:52:57 UTC (rev 11804) |
15 |
+++ main/trunk/pym/_emerge/__init__.py 2008-11-03 08:00:07 UTC (rev 11805) |
16 |
@@ -5288,10 +5288,6 @@ |
17 |
xinfo='"%s"' % arg |
18 |
# Discard null/ from failed cpv_expand category expansion. |
19 |
xinfo = xinfo.replace("null/", "") |
20 |
- if myparent: |
21 |
- xfrom = '(dependency required by '+ \ |
22 |
- green('"%s"' % myparent[2]) + \ |
23 |
- red(' [%s]' % myparent[0]) + ')' |
24 |
masked_packages = [] |
25 |
missing_use = [] |
26 |
missing_licenses = [] |
27 |
@@ -5386,8 +5382,24 @@ |
28 |
show_mask_docs() |
29 |
else: |
30 |
print "\nemerge: there are no ebuilds to satisfy "+green(xinfo)+"." |
31 |
- if myparent: |
32 |
- print xfrom |
33 |
+ |
34 |
+ # Show parent nodes and the argument that pulled them in. |
35 |
+ node = myparent |
36 |
+ msg = [] |
37 |
+ while node is not None: |
38 |
+ msg.append('(dependency required by "%s" [%s])' % \ |
39 |
+ (colorize('INFORM', str(node.cpv)), node.type_name)) |
40 |
+ parent = None |
41 |
+ for parent in self.digraph.parent_nodes(node): |
42 |
+ if isinstance(parent, DependencyArg): |
43 |
+ msg.append('(dependency required by "%s" [argument])' % \ |
44 |
+ (colorize('INFORM', str(parent)))) |
45 |
+ parent = None |
46 |
+ break |
47 |
+ node = parent |
48 |
+ for line in msg: |
49 |
+ print line |
50 |
+ |
51 |
print |
52 |
|
53 |
def _select_pkg_highest_available(self, root, atom, onlydeps=False): |