1 |
Author: scarabeus |
2 |
Date: 2010-10-28 21:31:47 +0000 (Thu, 28 Oct 2010) |
3 |
New Revision: 838 |
4 |
|
5 |
Modified: |
6 |
trunk/gentoolkit/pym/gentoolkit/equery/keywords.py |
7 |
trunk/gentoolkit/pym/gentoolkit/eshowkw/__init__.py |
8 |
Log: |
9 |
Fix import path again. Process only proper passed args in required function. |
10 |
|
11 |
Modified: trunk/gentoolkit/pym/gentoolkit/equery/keywords.py |
12 |
=================================================================== |
13 |
--- trunk/gentoolkit/pym/gentoolkit/equery/keywords.py 2010-10-28 21:18:06 UTC (rev 837) |
14 |
+++ trunk/gentoolkit/pym/gentoolkit/equery/keywords.py 2010-10-28 21:31:47 UTC (rev 838) |
15 |
@@ -2,6 +2,8 @@ |
16 |
# Distributed under the terms of the GNU General Public License v2 |
17 |
|
18 |
import sys |
19 |
-from ...gentoolkit.eshowkw import main as emain |
20 |
+from gentoolkit.eshowkw import main as emain |
21 |
|
22 |
+# we have equery as first argument instead of the scriptname |
23 |
+# so we will just ommit it |
24 |
emain(sys.argv) |
25 |
|
26 |
Modified: trunk/gentoolkit/pym/gentoolkit/eshowkw/__init__.py |
27 |
=================================================================== |
28 |
--- trunk/gentoolkit/pym/gentoolkit/eshowkw/__init__.py 2010-10-28 21:18:06 UTC (rev 837) |
29 |
+++ trunk/gentoolkit/pym/gentoolkit/eshowkw/__init__.py 2010-10-28 21:31:47 UTC (rev 838) |
30 |
@@ -79,6 +79,10 @@ |
31 |
def main(argv): |
32 |
global ignore_slots, bold, order, topper |
33 |
|
34 |
+ # equery support |
35 |
+ if argv[0] = 'equery': |
36 |
+ pkgsearch_only = True |
37 |
+ |
38 |
#opts parsing |
39 |
opts = process_args(argv) |
40 |
ignore_slots = opts.ignore_slot |
41 |
@@ -93,6 +97,12 @@ |
42 |
prefix = opts.prefix |
43 |
color = opts.color |
44 |
package = opts.package |
45 |
+ |
46 |
+ # equery support |
47 |
+ if pkgsearch_only and len(package) <= 0: |
48 |
+ msg_err = 'No packages specified' |
49 |
+ raise SystemExit(msg_err) |
50 |
+ |
51 |
# disable colors when redirected and they are not forced on |
52 |
if not color and not sys.stdout.isatty(): |
53 |
# disable colors |