portageq: fix envvar -v, bug #462412 v2.2.0_alpha168
authorZac Medico <zmedico@gentoo.org>
Wed, 20 Mar 2013 03:30:32 +0000 (20:30 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 20 Mar 2013 03:30:32 +0000 (20:30 -0700)
bin/portageq

index b3c872dea5e7bbefe3785f4c82b4545de48d4a92..c88ee8804e03aeccc3d56587e3d60687940c6126 100755 (executable)
@@ -1156,6 +1156,10 @@ def main(argv):
                portage.output.nocolor()
 
        parser = optparse.OptionParser(add_help_option=False)
+
+       # used by envvar
+       parser.add_option("-v", dest="verbose", action="store_true")
+
        actions = optparse.OptionGroup(parser, 'Actions')
        actions.add_option("-h", "--help", action="store_true")
        actions.add_option("--version", action="store_true")
@@ -1210,6 +1214,10 @@ def main(argv):
        if cmd is None:
                return pquery(parser, pquery_option_groups, opts, args)
 
+       if opts.verbose:
+               # used by envvar
+               args.append("-v")
+
        argv = argv[:1] + args
 
        if len(argv) < 2: