From 5fb4f8631279864258566a06a7fcdd319bc2295b Mon Sep 17 00:00:00 2001 From: Haibo Lin Date: Mon, 13 Mar 2023 16:09:17 +0800 Subject: [PATCH] Prevent to reuse if unsigned packages are allowed JIRA: RHELCMP-8415 Signed-off-by: Haibo Lin (cherry picked from commit b30f7e0d832c6c8d126ded6eb7b3137f87c38d2f) --- pungi/phases/pkgset/pkgsets.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pungi/phases/pkgset/pkgsets.py b/pungi/phases/pkgset/pkgsets.py index 6e269099..b1dbed01 100644 --- a/pungi/phases/pkgset/pkgsets.py +++ b/pungi/phases/pkgset/pkgsets.py @@ -692,6 +692,15 @@ class KojiPackageSet(PackageSetBase): :param include_packages: an iterable of tuples (package name, arch) that should be included. """ + if len(self.sigkey_ordering) > 1 and ( + None in self.sigkey_ordering or "" in self.sigkey_ordering + ): + self.log_warning( + "Stop writing reuse file as unsigned packages are allowed " + "in the compose." + ) + return + reuse_file = compose.paths.work.pkgset_reuse_file(self.name) self.log_info("Writing pkgset reuse file: %s" % reuse_file) try: