summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pym/gentoolkit/equery/keywords.py4
-rw-r--r--pym/gentoolkit/eshowkw/__init__.py10
2 files changed, 13 insertions, 1 deletions
diff --git a/pym/gentoolkit/equery/keywords.py b/pym/gentoolkit/equery/keywords.py
index f876510..e9ec5eb 100644
--- a/pym/gentoolkit/equery/keywords.py
+++ b/pym/gentoolkit/equery/keywords.py
@@ -2,6 +2,8 @@
# Distributed under the terms of the GNU General Public License v2
import sys
-from ...gentoolkit.eshowkw import main as emain
+from gentoolkit.eshowkw import main as emain
+# we have equery as first argument instead of the scriptname
+# so we will just ommit it
emain(sys.argv)
diff --git a/pym/gentoolkit/eshowkw/__init__.py b/pym/gentoolkit/eshowkw/__init__.py
index 672996c..a6f1ff4 100644
--- a/pym/gentoolkit/eshowkw/__init__.py
+++ b/pym/gentoolkit/eshowkw/__init__.py
@@ -79,6 +79,10 @@ def process_args(argv):
def main(argv):
global ignore_slots, bold, order, topper
+ # equery support
+ if argv[0] = 'equery':
+ pkgsearch_only = True
+
#opts parsing
opts = process_args(argv)
ignore_slots = opts.ignore_slot
@@ -93,6 +97,12 @@ def main(argv):
prefix = opts.prefix
color = opts.color
package = opts.package
+
+ # equery support
+ if pkgsearch_only and len(package) <= 0:
+ msg_err = 'No packages specified'
+ raise SystemExit(msg_err)
+
# disable colors when redirected and they are not forced on
if not color and not sys.stdout.isatty():
# disable colors