From: genone Date: Sat, 30 Apr 2005 15:47:50 +0000 (-0000) Subject: forgot V in short option list X-Git-Tag: gentoolkit-0.2.4.3~294 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3a96e2206228c98e615a5b49d82a551b50550f1c;p=gentoolkit.git forgot V in short option list svn path=/; revision=212 --- diff --git a/trunk/ChangeLog b/trunk/ChangeLog index f067f5e..7cb96d7 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,6 @@ +2005-04-30 Marius Mauch + * glsa-check: add V to short option list so it actually works + 2005-04-26 Marius Mauch * gentoolkit: fix broken Makefile * gentoolkit: add some sticky tape to get the stupid thing working again 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]