Drop compatibility with Koji < 1.32

The 1.32 version with checksum API has been released more than 2 years
ago.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
(cherry picked from commit 65336b406c01a99ccc9dabd011cc969b4395e106)
This commit is contained in:
Lubomír Sedlář 2025-04-28 12:49:02 +02:00 committed by Stepan Oksanichenko
parent fc2cc0073a
commit dcd7e5ff2a
3 changed files with 8 additions and 19 deletions

View File

@ -548,8 +548,6 @@ class KojiPackageSet(PackageSetBase):
pathinfo = self.koji_wrapper.koji_module.pathinfo
paths = []
if "getRPMChecksums" in self.koji_wrapper.koji_methods:
def checksum_validator(keyname, pkg_path):
checksums = self.koji_proxy.getRPMChecksums(
rpm_info["id"], checksum_types=("sha256",)
@ -559,12 +557,6 @@ class KojiPackageSet(PackageSetBase):
if computed["sha256"] != checksums[keyname]["sha256"]:
raise RuntimeError("Checksum mismatch for %s" % pkg_path)
else:
def checksum_validator(keyname, pkg_path):
# Koji doesn't support checksums yet
pass
attempts_left = self.signed_packages_retries + 1
while attempts_left > 0:
for sigkey in self.sigkey_ordering:

View File

@ -72,8 +72,6 @@ class KojiWrapper(object):
self.koji_proxy = tracing.instrument_xmlrpc_proxy(
koji.ClientSession(self.koji_module.config.server, session_opts)
)
with tracing.span("koji.system.listMethods"):
self.koji_methods = self.koji_proxy.system.listMethods()
# This retry should be removed once https://pagure.io/koji/issue/3170 is
# fixed and released.

View File

@ -158,7 +158,6 @@ class TestKojiPkgset(PkgsetCompareMixin, helpers.PungiTestCase):
self.koji_downloader = helpers.FSKojiDownloader()
self.koji_wrapper = mock.Mock()
self.koji_wrapper.koji_proxy.listTaggedRPMS.return_value = self.tagged_rpms
self.koji_wrapper.koji_methods = ["getRPM", "getRPMChecksums"]
self.koji_wrapper.koji_module.pathinfo = self.path_info
def _touch_files(self, filenames):