From: Daan De Meyer Date: Wed, 14 Jan 2026 18:22:41 +0000 (+0100) Subject: opensuse: Simplify GPG logic X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06f96cfeed4d7ac97a19da4d3d2e069daebbfea0;p=thirdparty%2Fmkosi.git opensuse: Simplify GPG logic No need to check ourselves, we can delegate the check to find_rpm_gpgkey() instead. --- diff --git a/mkosi/distribution/opensuse.py b/mkosi/distribution/opensuse.py index 039398f17..9e813fbb5 100644 --- a/mkosi/distribution/opensuse.py +++ b/mkosi/distribution/opensuse.py @@ -92,15 +92,9 @@ class Installer(DistributionInstaller, distribution=Distribution.opensuse): gpgkeys = tuple( p for key in ("RPM-GPG-KEY-openSUSE-Tumbleweed", "RPM-GPG-KEY-openSUSE") - if (p := find_rpm_gpgkey(context, key, required=False)) + if (p := find_rpm_gpgkey(context, key, required=not context.config.repository_key_fetch)) ) - if not gpgkeys and not context.config.repository_key_fetch: - die( - "openSUSE GPG keys not found in /usr/share/distribution-gpg-keys", - hint="Make sure the distribution-gpg-keys package is installed", - ) - if context.config.snapshot: if context.config.architecture != Architecture.x86_64: die(f"Snapshot= is only supported for x86-64 on {cls.pretty_name()}")