From 24f6f5abc052453964160dda6c6d37dcd907c0e9 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 19 Feb 2007 08:46:42 +0000 Subject: For bug #167217, don't hardcode /usr/lib/portage. (trunk r5945) svn path=/main/branches/2.1.2/; revision=6016 --- bin/portageq | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'bin/portageq') 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): - """ - 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): - """ + - 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 -- cgit v1.2.3-1-g7c22