From 61ccfd288efc0958b3cc0aa78e4b01119a2fa255 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Dec 16 2025 06:52:38 +0000 Subject: download-build: exit non-zero if all downloads skipped In https://pagure.io/fedora-ci/general/issue/536 we noticed that download-build does not exit 0 even if it winds up downloading nothing at all. This can happen if all packages are skipped because they're for the wrong arch, or they're debuginfo and you didn't pass the argument to download debuginfo packages, or they're not signed and you passed --key and didn't pass --fallback-unsigned. It seems more useful to error in this case, since this is probably not what the caller expected. Signed-off-by: Adam Williamson --- diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 6eddb50..2ad1eac 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -7184,6 +7184,8 @@ def anon_handle_download_build(options, session, args): unsigned.append(rpm) size = len(rpms) + len(unsigned) + len(archives) + if not size: + error("All packages skipped due to being unsigned, wrong arch or debuginfo") number = 0 # run the download