From: Michael Tremer Date: Thu, 13 May 2021 18:15:38 +0000 (+0000) Subject: pakfire info: Add --long switch and --filelist X-Git-Tag: 0.9.28~1285^2~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31ed921fb242d73c44fe36fafc8a315f96f2ccef;p=pakfire.git pakfire info: Add --long switch and --filelist Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/cli.py b/src/pakfire/cli.py index 0b2bb1766..01576205f 100644 --- a/src/pakfire/cli.py +++ b/src/pakfire/cli.py @@ -111,6 +111,8 @@ class Cli(object): # info info = subparsers.add_parser("info", help=_("Print some information about the given package(s)")) + info.add_argument("--long", action="store_true", + help=_("Show more information")) info.add_argument("package", nargs="+", help=_("Give at least the name of one package")) info.set_defaults(func=self.handle_info) @@ -305,7 +307,7 @@ class Cli(object): def handle_info(self, ns): with self.pakfire(ns) as p: for pkg in p.info(ns.package): - s = pkg.dump(long=ns.verbose) + s = pkg.dump(long=ns.long) self.ui.message(s) def handle_search(self, ns): @@ -469,9 +471,11 @@ class CliBuilder(Cli): # info info = subparsers.add_parser("info", help=_("Print some information about the given package(s)")) + info.add_argument("--filelist", action="store_true", + help=_("Show filelist")) info.add_argument("package", nargs="+", help=_("Give at least the name of one package.")) - info.set_defaults(func=self.handle_info, verbose=True) + info.set_defaults(func=self.handle_info) # provides provides = subparsers.add_parser("provides", @@ -529,7 +533,7 @@ class CliBuilder(Cli): with self.builder(ns) as b: with b.pakfire as p: for pkg in p.info(ns.package): - s = pkg.dump(long=ns.verbose) + s = pkg.dump(long=True, filelist=ns.filelist) self.ui.message(s) def handle_repolist(self, ns):