1 |
Author: scarabeus |
2 |
Date: 2010-11-02 14:05:00 +0000 (Tue, 02 Nov 2010) |
3 |
New Revision: 843 |
4 |
|
5 |
Modified: |
6 |
trunk/gentoolkit/bin/eshowkw |
7 |
trunk/gentoolkit/pym/gentoolkit/equery/keywords.py |
8 |
trunk/gentoolkit/pym/gentoolkit/eshowkw/__init__.py |
9 |
trunk/gentoolkit/pym/gentoolkit/eshowkw/keywords_content.py |
10 |
Log: |
11 |
Fix arg parsing everywhere for eshowkw. |
12 |
|
13 |
Modified: trunk/gentoolkit/bin/eshowkw |
14 |
=================================================================== |
15 |
--- trunk/gentoolkit/bin/eshowkw 2010-11-02 13:53:19 UTC (rev 842) |
16 |
+++ trunk/gentoolkit/bin/eshowkw 2010-11-02 14:05:00 UTC (rev 843) |
17 |
@@ -3,7 +3,6 @@ |
18 |
# Copyright 2010 Gentoo Foundation |
19 |
# Distributed under the terms of the GNU General Public License v2 |
20 |
|
21 |
-import sys |
22 |
from gentoolkit.eshowkw import main as emain |
23 |
|
24 |
-emain(sys.argv) |
25 |
+emain(args[1:]) |
26 |
|
27 |
Modified: trunk/gentoolkit/pym/gentoolkit/equery/keywords.py |
28 |
=================================================================== |
29 |
--- trunk/gentoolkit/pym/gentoolkit/equery/keywords.py 2010-11-02 13:53:19 UTC (rev 842) |
30 |
+++ trunk/gentoolkit/pym/gentoolkit/equery/keywords.py 2010-11-02 14:05:00 UTC (rev 843) |
31 |
@@ -5,6 +5,5 @@ |
32 |
import sys |
33 |
from gentoolkit.eshowkw import main as emain |
34 |
|
35 |
-# we have equery as first argument instead of the scriptname |
36 |
-# so we will just ommit it |
37 |
-emain(sys.argv) |
38 |
+def main(input_args): |
39 |
+ args.extend(input_args) |
40 |
\ No newline at end of file |
41 |
|
42 |
Modified: trunk/gentoolkit/pym/gentoolkit/eshowkw/__init__.py |
43 |
=================================================================== |
44 |
--- trunk/gentoolkit/pym/gentoolkit/eshowkw/__init__.py 2010-11-02 13:53:19 UTC (rev 842) |
45 |
+++ trunk/gentoolkit/pym/gentoolkit/eshowkw/__init__.py 2010-11-02 14:05:00 UTC (rev 843) |
46 |
@@ -75,7 +75,7 @@ |
47 |
parser.add_argument('-S', '--ignore-slot', action='store_true', default=False, |
48 |
help='Treat slots as irelevant during detection of redundant pacakges.') |
49 |
|
50 |
- return parser.parse_args(args=argv[1:]) |
51 |
+ return parser.parse_args(args=argv) |
52 |
|
53 |
def main(argv): |
54 |
global ignore_slots, bold, order, topper |
55 |
@@ -129,4 +129,4 @@ |
56 |
return 0 |
57 |
|
58 |
if __name__ == '__main__': |
59 |
- sys.exit(main(sys.argv)) |
60 |
+ sys.exit(main(sys.argv[1:])) |
61 |
|
62 |
Modified: trunk/gentoolkit/pym/gentoolkit/eshowkw/keywords_content.py |
63 |
=================================================================== |
64 |
--- trunk/gentoolkit/pym/gentoolkit/eshowkw/keywords_content.py 2010-11-02 13:53:19 UTC (rev 842) |
65 |
+++ trunk/gentoolkit/pym/gentoolkit/eshowkw/keywords_content.py 2010-11-02 14:05:00 UTC (rev 843) |
66 |
@@ -155,7 +155,11 @@ |
67 |
def __checkExist(self, pdb, package): |
68 |
"""Check if specified package even exists.""" |
69 |
try: |
70 |
- matches = pdb.xmatch('match-all', package) |
71 |
+ cp = port.dep_expand(package, mydb=pdb, settings=pdb.settings).cp |
72 |
+ matches = [] |
73 |
+ for repo in pdb.porttrees: |
74 |
+ for cpv in pdb.cp_list(mycp=cp,mytree=[repo]): |
75 |
+ matches.append((cpv, repo)) |
76 |
except port.exception.AmbiguousPackageName as Arg: |
77 |
msg_err = 'Ambiguous package name "%s".\n' % package |
78 |
found = 'Possibilities: %s' % Arg |