From 45672b69d945c02c51fddf750c219e5d3b8fb646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Persson?= Date: Sun, 3 Nov 2024 15:02:40 +0100 Subject: [PATCH 1/4] Made some help texts more informative. --- cli/koji_cli/commands.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index e461911a..b65b6800 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -596,9 +596,13 @@ def handle_build(options, session, args): help="Wait on the build, even if running in the background") parser.add_option("--nowait", action="store_false", dest="wait", help="Don't wait on build") parser.add_option("--wait-repo", action="store_true", - help="Wait for a current repo for the build tag") + help="Wait for a current repo for the build tag before " + "building") parser.add_option("--wait-build", metavar="NVR", action="append", dest="wait_builds", - default=[], help="Wait for the given nvr to appear in buildroot repo") + default=[], + help="Wait for the given NVR to appear, and refresh the " + "buildroot repo if needed to include the NVR before " + "building") parser.add_option("--quiet", action="store_true", help="Do not print the task information", default=options.quiet) parser.add_option("--arch-override", help="Override build arches") @@ -7588,9 +7592,11 @@ def anon_handle_wait_repo(options, session, args): parser.add_option("--target", action="store_true", help="Interpret the argument as a build target name") parser.add_option("--request", action="store_true", - help="Create a repo request (requires auth)") + help="Request refreshing the repo and wait until the " + "refresh is done (requires auth)") parser.add_option("--no-request", action="store_false", dest="request", - help="Do not create a repo request (the default)") + help="Do not request refreshing the repo, just wait for " + "it to happen (the default)") parser.add_option("--timeout", type="int", default=120, help="Amount of time to wait (in minutes) before giving up " "(default: 120)") From 698204bd60a125949314bec52bacc3e50412bf87 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Tue, 23 Jun 2026 10:25:28 -0400 Subject: [PATCH 2/4] language tweaks --- cli/koji_cli/commands.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index b65b6800..7dd7284c 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -596,13 +596,11 @@ def handle_build(options, session, args): help="Wait on the build, even if running in the background") parser.add_option("--nowait", action="store_false", dest="wait", help="Don't wait on build") parser.add_option("--wait-repo", action="store_true", - help="Wait for a current repo for the build tag before " - "building") + help="Wait for a current repo for the build tag before building") parser.add_option("--wait-build", metavar="NVR", action="append", dest="wait_builds", default=[], - help="Wait for the given NVR to appear, and refresh the " - "buildroot repo if needed to include the NVR before " - "building") + help="Wait for the given NVR to appear in the build tag, " + "then wait for a current repo before building") parser.add_option("--quiet", action="store_true", help="Do not print the task information", default=options.quiet) parser.add_option("--arch-override", help="Override build arches") From 102571a5c69d3b89f28dfdcea9446a0b82b95bbf Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Tue, 23 Jun 2026 10:36:43 -0400 Subject: [PATCH 3/4] also adjust wrapper-rpm opts for consistency --- cli/koji_cli/commands.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 7dd7284c..829562f1 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -871,9 +871,11 @@ def handle_wrapper_rpm(options, session, args): parser.add_option("--create-draft", action="store_true", help="Create a new draft build instead") parser.add_option("--wait-repo", action="store_true", - help="Wait for a current repo for the build tag") + help="Wait for a current repo for the build tag before building") parser.add_option("--wait-build", metavar="NVR", action="append", dest="wait_builds", - default=[], help="Wait for the given nvr to appear in buildroot repo") + default=[], + help="Wait for the given NVR to appear in the build tag, " + "then wait for a current repo before building") (build_opts, args) = parser.parse_args(args) if build_opts.inis: From d0d27e6783edd2b168c1ae7df8e66c887fbe4636 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Tue, 23 Jun 2026 10:36:56 -0400 Subject: [PATCH 4/4] unit tests --- tests/test_cli/test_build.py | 6 ++++-- tests/test_cli/test_wait_repo.py | 6 ++++-- tests/test_cli/test_wrapper_rpm.py | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/test_cli/test_build.py b/tests/test_cli/test_build.py index 11b6fceb..cb47ea8c 100644 --- a/tests/test_cli/test_build.py +++ b/tests/test_cli/test_build.py @@ -168,8 +168,10 @@ Options: --no-rebuild-srpm Force not to rebuild srpm for scratch build only --wait Wait on the build, even if running in the background --nowait Don't wait on build - --wait-repo Wait for a current repo for the build tag - --wait-build=NVR Wait for the given nvr to appear in buildroot repo + --wait-repo Wait for a current repo for the build tag before + building + --wait-build=NVR Wait for the given NVR to appear in the build tag, + then wait for a current repo before building --quiet Do not print the task information --arch-override=ARCH_OVERRIDE Override build arches diff --git a/tests/test_cli/test_wait_repo.py b/tests/test_cli/test_wait_repo.py index bbd22266..3494c1b9 100644 --- a/tests/test_cli/test_wait_repo.py +++ b/tests/test_cli/test_wait_repo.py @@ -236,8 +236,10 @@ Options: --build=NVR Check that the given build is in the newly-generated repo (may be used multiple times) --target Interpret the argument as a build target name - --request Create a repo request (requires auth) - --no-request Do not create a repo request (the default) + --request Request refreshing the repo and wait until the refresh is + done (requires auth) + --no-request Do not request refreshing the repo, just wait for it to + happen (the default) --timeout=TIMEOUT Amount of time to wait (in minutes) before giving up (default: 120) -v, --verbose Be verbose diff --git a/tests/test_cli/test_wrapper_rpm.py b/tests/test_cli/test_wrapper_rpm.py index 3561d4cf..75ffcfed 100644 --- a/tests/test_cli/test_wrapper_rpm.py +++ b/tests/test_cli/test_wrapper_rpm.py @@ -268,8 +268,10 @@ Options: --nowait Don't wait on build --background Run the build at a lower priority --create-draft Create a new draft build instead - --wait-repo Wait for a current repo for the build tag - --wait-build=NVR Wait for the given nvr to appear in buildroot repo + --wait-repo Wait for a current repo for the build tag before + building + --wait-build=NVR Wait for the given NVR to appear in the build tag, + then wait for a current repo before building """ % self.progname)