From: Michael Tremer Date: Mon, 21 Jun 2021 10:42:48 +0000 (+0000) Subject: cli: Remove extract/check-update/downgrade X-Git-Tag: 0.9.28~1217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45db401e5a7cb82a166dad61c0ded3a454551f69;p=pakfire.git cli: Remove extract/check-update/downgrade Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/cli.py b/src/pakfire/cli.py index c16e2196a..84f651627 100644 --- a/src/pakfire/cli.py +++ b/src/pakfire/cli.py @@ -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):