From e63508f8a09d616dc20240fe1b1c52d62d362292 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jan 19 2021 12:37:56 +0000 Subject: [PATCH 1/2] cli: hide import-sig --write option It is no more used, hide it from the user. Fixes: https://pagure.io/koji/issue/2620 --- diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 6e84386..2384d91 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -1455,8 +1455,7 @@ def handle_import_sig(goptions, session, args): parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--with-unsigned", action="store_true", help=_("Also import unsigned sig headers")) - parser.add_option("--write", action="store_true", - help=_("Also write the signed copies")) + parser.add_option("--write", action="store_true", help=SUPPRESS_HELP) parser.add_option("--test", action="store_true", help=_("Test mode -- don't actually import")) (options, args) = parser.parse_args(args) diff --git a/tests/test_cli/test_import_sig.py b/tests/test_cli/test_import_sig.py index 074a227..7de630e 100644 --- a/tests/test_cli/test_import_sig.py +++ b/tests/test_cli/test_import_sig.py @@ -276,7 +276,6 @@ class TestImportSIG(utils.CliTestCase): Options: -h, --help show this help message and exit --with-unsigned Also import unsigned sig headers - --write Also write the signed copies --test Test mode -- don't actually import """ % self.progname) From 932994f720cf4d8c5f8d5fc6c4c027b28a148f50 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jan 25 2021 12:31:51 +0000 Subject: [PATCH 2/2] update help text --- diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 2384d91..3b08898 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -1450,7 +1450,7 @@ def _import_comps_alt(session, filename, tag, options): # no cover 3.x def handle_import_sig(goptions, session, args): - "[admin] Import signatures into the database" + "[admin] Import signatures into the database and write signed RPMs" usage = _("usage: %prog import-sig [options] [ ...]") parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--with-unsigned", action="store_true",