summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'bin/portageq')
-rwxr-xr-xbin/portageq74
1 files changed, 0 insertions, 74 deletions
diff --git a/bin/portageq b/bin/portageq
deleted file mode 100755
index d749318..0000000
--- a/bin/portageq
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/python -O
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/portageq,v 1.15 2004/12/07 15:06:41 jstubbs Exp $
-
-import sys
-sys.path = ["/usr/lib/portage/pym"]+sys.path
-
-import portage,types, portageq
-
-
-#-----------------------------------------------------------------------------
-#
-# DO NOT CHANGE CODE BEYOND THIS POINT - IT'S NOT NEEDED!
-#
-
-def usage():
- rev="$Revision: 1.15 $"
- ver=rev.split(' ')[1]
- print ">>> Portage information query tool -- version "+ver
- print ">>> Usage: portageq <command> [<option> ...]"
- print ""
- print "Available commands:"
-
- #
- # Show our commands -- we do this by scanning the functions in this
- # file, and formatting each functions documentation.
- #
- for name in dir(portageq):
- # Drop python stuff, modules, and our own support functions.
- if (name in ("usage", "__doc__", "__name__", "main", "os", "portage", "sys", "__builtins__", "types", "string")):
- continue
-
- # Drop non-functions
- obj = getattr(portageq,name)
- if (type(obj) != types.FunctionType):
- continue
-
- doc = obj.__doc__
- if (doc == None):
- print " "+name
- print " MISSING DOCUMENTATION!"
- print ""
- continue
-
- lines = doc.split('\n')
- print " "+name+" "+lines[0].strip()
- for line in lines[1:]:
- print " "+line.strip()
-
-
-def main():
- if (len(sys.argv) < 2):
- usage()
- sys.exit()
-
- cmd = sys.argv[1]
- try:
- function = getattr(portageq,cmd)
- e,s = function(sys.argv[2:])
- print s
- sys.exit(e)
- except KeyError:
- usage()
- sys.exit()
- except SystemExit:
- raise
- except Exception,e:
- sys.exit(1)
-
-main()
-
-
-#-----------------------------------------------------------------------------