summaryrefslogtreecommitdiff
path: root/trunk/src
diff options
context:
space:
mode:
authorgenone <genone@gentoo.org>2005-04-30 15:47:50 +0000
committergenone <genone@gentoo.org>2005-04-30 15:47:50 +0000
commit3a96e2206228c98e615a5b49d82a551b50550f1c (patch)
tree1c266d302530896da6131c8829d0d9c6425bf6b8 /trunk/src
parent05dc14f1d04b12d38a83ff21dc0f5f54b9864e57 (diff)
downloadgentoolkit-3a96e2206228c98e615a5b49d82a551b50550f1c.tar.gz
forgot V in short option list
svn path=/; revision=212
Diffstat (limited to 'trunk/src')
-rwxr-xr-xtrunk/src/equery/equery21
-rw-r--r--trunk/src/glsa-check/glsa-check2
2 files changed, 18 insertions, 5 deletions
diff --git a/trunk/src/equery/equery b/trunk/src/equery/equery
index 102e508..cccf4d7 100755
--- a/trunk/src/equery/equery
+++ b/trunk/src/equery/equery
@@ -273,7 +273,8 @@ class CmdListBelongs(Command):
self.default_opts = {
"category": "*",
"fullRegex": 0,
- "earlyOut": 0
+ "earlyOut": 0,
+ "nameOnly": 0
}
def parseArgs(self, args):
@@ -300,6 +301,8 @@ class CmdListBelongs(Command):
opts["earlyOut"] = 1
elif x in ["-f", "--full-regex"]:
opts["fullRegex"] = 1
+ elif x in ["-n", "--name-only"]:
+ opts["nameOnly"] = 1
else:
query.append(x)
@@ -344,7 +347,11 @@ class CmdListBelongs(Command):
if not cnt: return
for file in cnt.keys():
if rx.search(file) and (opts["category"] == "*" or portage.catpkgsplit(pkg)[0] == opts["category"]):
- print pkg
+ if opts["nameOnly"]:
+ x = portage.catpkgsplit(pkg)
+ print x[0]+"/"+x[1]
+ else:
+ print pkg
return
class DummyExp:
@@ -357,7 +364,12 @@ class CmdListBelongs(Command):
if not cnt: return
for file in cnt.keys():
if rx.search(file) and (opts["category"] == "*" or portage.catpkgsplit(pkg)[0] == opts["category"]):
- s = pkg + " (" + pp.path(fileAsStr(file, cnt[file])) + ")"
+ if opts["nameOnly"]:
+ x = portage.catpkgsplit(pkg)
+ s = x[0]+"/"+x[1]
+ else:
+ s = pkg
+ s += " (" + pp.path(fileAsStr(file, cnt[file])) + ")"
print_info(0, s)
if opts["earlyOut"]:
raise DummyExp
@@ -385,7 +397,8 @@ class CmdListBelongs(Command):
" " + pp.localoption("-c, --category cat") + " - only search in category " + \
pp.pkgquery("cat") + "\n" + \
" " + pp.localoption("-f, --full-regex") + " - supplied query is a regex\n" + \
- " " + pp.localoption("-e, --earlyout") + " - stop when first match is found\n"
+ " " + pp.localoption("-e, --earlyout") + " - stop when first match is found\n" + \
+ " " + pp.localoption("-n, --name-only") + " - don't print the version."
class CmdDisplayUSEs(Command):
"""Advanced report of a package's USE flags"""
diff --git a/trunk/src/glsa-check/glsa-check b/trunk/src/glsa-check/glsa-check
index 739cc75..a922a51 100644
--- a/trunk/src/glsa-check/glsa-check
+++ b/trunk/src/glsa-check/glsa-check
@@ -38,7 +38,7 @@ sys.stderr.write("before using this tool AND before reporting a bug.\n\n")
args = []
params = []
try:
- args, params = getopt(sys.argv[1:], "dplfchinvt", \
+ args, params = getopt(sys.argv[1:], "dplfchinvVt", \
["dump", "print", "list", "pretend", "fix", "inject", "help", "info", "version", "test", "nocolor"])
args = [a for a,b in args]