summaryrefslogtreecommitdiffstats
path: root/bin/portageq
diff options
context:
space:
mode:
Diffstat (limited to 'bin/portageq')
-rwxr-xr-xbin/portageq11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/portageq b/bin/portageq
index 791aa4c9a..6485d7c79 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -270,6 +270,17 @@ def envvar(argv):
else:
print portage.settings[arg]
+def get_repos(argv):
+ """<root>
+ Returns all repos with names (repo_name file) argv[0] = $ROOT
+ """
+ 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
+ """
+ print portage.db[argv[0]]["porttree"].dbapi.getRepositoryPath(argv[1])
#-----------------------------------------------------------------------------
#