summaryrefslogtreecommitdiffstats
path: root/bin/portageq
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-02-19 08:46:42 +0000
committerZac Medico <zmedico@gentoo.org>2007-02-19 08:46:42 +0000
commit24f6f5abc052453964160dda6c6d37dcd907c0e9 (patch)
tree3eded2c341d306223bb1ae4f684ca3b70dbbcd15 /bin/portageq
parentdce252e58f4bad4c7be7d0366adb06d6ba45c20b (diff)
downloadportage-24f6f5abc052453964160dda6c6d37dcd907c0e9.tar.gz
portage-24f6f5abc052453964160dda6c6d37dcd907c0e9.tar.bz2
portage-24f6f5abc052453964160dda6c6d37dcd907c0e9.zip
For bug #167217, don't hardcode /usr/lib/portage. (trunk r5945)
svn path=/main/branches/2.1.2/; revision=6016
Diffstat (limited to 'bin/portageq')
-rwxr-xr-xbin/portageq23
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