diff options
Diffstat (limited to 'bin/portageq')
-rwxr-xr-x | bin/portageq | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/bin/portageq b/bin/portageq index aa302555d..de2a24c12 100755 --- a/bin/portageq +++ b/bin/portageq @@ -270,24 +270,6 @@ def envvar(argv): else: print portage.settings[arg] -def get_repos(argv): - """<root> - Returns all repos with names (repo_name file) argv[0] = $ROOT - """ - if len(argv) < 1: - print "ERROR: insufficient parameters!" - sys.exit(2) - print " ".join(portage.db[argv[0]]["porttree"].dbapi.getRepositories()) - -def get_repo_path(argv): - """<root> <repo_id>+ - Returns the path to the repo named argv[1], argv[0] = $ROOT - """ - if len(argv) < 2: - print "ERROR: insufficient parameters!" - sys.exit(2) - for arg in arvg[1:] - print portage.db[argv[0]]["porttree"].dbapi.getRepositoryPath(argv[1]) #----------------------------------------------------------------------------- # @@ -308,7 +290,7 @@ def usage(argv): # for name in globals().keys(): # Drop python stuff, modules, and our own support functions. - if (name in ("usage", "__doc__", "__name__", "main", "os", "portage", "sys", "__builtins__", "types", "string","exithandler")): + if (name in ("usage", "__doc__", "__name__", "main", "os", "portage", "sys", "__builtins__", "types", "string")): continue # Drop non-functions @@ -351,7 +333,8 @@ def main(): try: import portage except ImportError: - sys.path.insert(0, "/usr/lib/portage/pym") + from os import path as osp + sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym")) import portage if uses_root: sys.argv[2] = portage.root |