From 64e7edfb3e54675ba910e9d1032335cad37801b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Lehmann?= Date: Mon, 11 Aug 2025 08:26:22 +0200 Subject: [PATCH] Require using --pre-build or --test-build when building with a user target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gaƫtan Lehmann --- scripts/koji/koji_build.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/koji/koji_build.py b/scripts/koji/koji_build.py index 05f2f22..104fafc 100755 --- a/scripts/koji/koji_build.py +++ b/scripts/koji/koji_build.py @@ -50,6 +50,8 @@ def check_commit_is_available_remotely(dirpath, hash, target, warn): with cd(dirpath): if not subprocess.check_output(['git', 'branch', '-r', '--contains', hash]): raise Exception("The current commit is not available in the remote repository") + if target is not None and re.match(r'v\d+\.\d+-u-.+', target): + raise Exception("Building with a user target requires using --pre-build or --test-build.\n") try: expected_branch = PROTECTED_TARGETS.get(target) if (