aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfuzzyray <fuzzyray@gentoo.org>2009-12-08 21:53:45 +0000
committerfuzzyray <fuzzyray@gentoo.org>2009-12-08 21:53:45 +0000
commitacdf616efa73b77936963eaa8b5c715db97646d2 (patch)
treed08ef2efee8b7edbf8c1df1a8de26439d6b42bd3 /bin/equery
parentSpeedup portageq queries. Include FuzzyRay's patch to respect EMERGE_DEFAULT_... (diff)
downloadgentoolkit-acdf616efa73b77936963eaa8b5c715db97646d2.tar.gz
gentoolkit-acdf616efa73b77936963eaa8b5c715db97646d2.tar.bz2
gentoolkit-acdf616efa73b77936963eaa8b5c715db97646d2.zip
Merge rev 113 from djanderson's genscripts repo
svn path=/trunk/gentoolkit/; revision=703
Diffstat (limited to 'bin/equery')
-rwxr-xr-xbin/equery20
1 files changed, 16 insertions, 4 deletions
diff --git a/bin/equery b/bin/equery
index bac8a3a..e7bb6ce 100755
--- a/bin/equery
+++ b/bin/equery
@@ -2,9 +2,11 @@
#
# Copyright 2002-2009 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2 or later
+#
+# $Header$
-"""equery is a flexible utility for Gentoo linux which can display various
-information about packages, such as the files they own, their USE flags,
+"""equery is a flexible utility for Gentoo linux which can display various
+information about packages, such as the files they own, their USE flags,
the MD5 sum of each file owned by a given package, and many other things.
"""
@@ -27,6 +29,16 @@ except KeyboardInterrupt:
print
sys.exit(1)
-from gentoolkit import equery
+from gentoolkit import equery, errors
-equery.main()
+try:
+ equery.main()
+except errors.GentoolkitException, err:
+ if '--debug' in sys.argv:
+ raise
+ else:
+ from gentoolkit import pprinter as pp
+ sys.stderr.write(pp.error(str(err)))
+ print
+ print "Add '--debug' to global options for traceback."
+ sys.exit(1)