]> git.ipfire.org Git - pakfire.git/commitdiff
cli: Remove extract/check-update/downgrade
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 21 Jun 2021 10:42:48 +0000 (10:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 21 Jun 2021 10:42:48 +0000 (10:42 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/cli.py

index c16e2196a7abf9f42160981a136dc39e44925590..84f651627f2f2880e999e811da2a5cf6d1e1544a 100644 (file)
@@ -61,33 +61,10 @@ class Cli(object):
                check = subparsers.add_parser("check", help=_("Check the system for any errors"))
                check.set_defaults(func=self.handle_check)
 
-               # check-update
-               check_update = subparsers.add_parser("check-update",
-                       help=_("Check, if there are any updates available"))
-               check_update.set_defaults(func=self.handle_check_update)
-               check_update.add_argument("--exclude", "-x", nargs="+",
-                       help=_("Exclude package from update"))
-               check_update.add_argument("--allow-archchange", action="store_true",
-                       help=_("Allow changing the architecture of packages"))
-               check_update.add_argument("--allow-downgrade", action="store_true",
-                       help=_("Allow downgrading of packages"))
-               check_update.add_argument("--allow-vendorchange", action="store_true",
-                       help=_("Allow changing the vendor of packages"))
-
                # clean
                clean = subparsers.add_parser("clean", help=_("Cleanup all temporary files"))
                clean.set_defaults(func=self.handle_clean)
 
-               # downgrade
-               downgrade = subparsers.add_parser("downgrade", help=_("Downgrade one or more packages"))
-               downgrade.add_argument("package", nargs="*",
-                       help=_("Give a name of a package to downgrade"))
-               downgrade.add_argument("--allow-vendorchange", action="store_true",
-                       help=_("Allow changing the vendor of packages"))
-               downgrade.add_argument("--disallow-archchange", action="store_true",
-                       help=_("Disallow changing the architecture of packages"))
-               downgrade.set_defaults(func=self.handle_downgrade)
-
                # execute
                execute = subparsers.add_parser("execute",
                        help=_("Executes a command in the pakfire environment (useful for development)"))
@@ -96,15 +73,6 @@ class Cli(object):
                execute.add_argument("command", nargs=argparse.REMAINDER)
                execute.set_defaults(func=self.handle_execute)
 
-               # extract
-               extract = subparsers.add_parser("extract",
-                       help=_("Extract a package to a directory"))
-               extract.add_argument("package", nargs="+",
-                       help=_("Give name of the file to extract"))
-               extract.add_argument("--target", nargs="?",
-                       help=_("Target directory where to extract to"))
-               extract.set_defaults(func=self.handle_extract)
-
                # info
                info = subparsers.add_parser("info",
                        help=_("Print some information about the given package(s)"))
@@ -298,18 +266,6 @@ class Cli(object):
 
                        self._execute_transaction(transaction)
 
-       def handle_check_update(self, ns):
-               self.handle_update(ns, check=True)
-
-       def handle_downgrade(self, ns, **args):
-               with self.pakfire(ns) as p:
-                       p.downgrade(
-                               self.args.package,
-                               allow_vendorchange=self.args.allow_vendorchange,
-                               allow_archchange=not self.args.disallow_archchange,
-                               **args
-                       )
-
        def handle_install(self, ns):
                p = self.pakfire(ns)
                p.install(ns.package, include_recommended=not ns.without_recommends)
@@ -354,9 +310,6 @@ class Cli(object):
 
                        print(_("Everything okay"))
 
-       def handle_extract(self, ns):
-               with self.pakfire(ns) as p:
-                       p.extract(ns.package, target=ns.target)
 
 
 class CliClient(Cli):