]> git.ipfire.org Git - pakfire.git/commitdiff
pakfire info: Add --long switch and --filelist
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 May 2021 18:15:38 +0000 (18:15 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 May 2021 18:15:38 +0000 (18:15 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/cli.py

index 0b2bb17666c8e1badd2ebb9d3836e1aa7c7ea690..01576205f90f186f0c02b044aa9e72f86fd01905 100644 (file)
@@ -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):