+ # The rawhide key can also not be a symlink and we end up with the wrong version so far. So let's
+ # cheat and look up the version remotely, but look for the version we get in the keys that exist
+ # locally.
+ remote_rawhide_version = read_remote_rawhide_key_symlink(context)
+ if key4 := find_rpm_gpgkey(context, key=remote_rawhide_version, required=False):
+ yield key4
+
+ # Same as above, the symlink in distribution-gpg-keys might not have been updated yet to point to
+ # the new rawhide key when branching happens, so try to load the N+1 key as well.
+ if m := versionre.match(remote_rawhide_version):
+ version = int(m.group(1))
+
+ if key5 := find_rpm_gpgkey(
+ context,
+ key=f"RPM-GPG-KEY-fedora-{version + 1}-primary",
+ required=False,
+ ):
+ yield key5
+