Fixup compatibility of kojid with koji-hub 1.21

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
epel9
Igor Raits 4 years ago
parent 05e377d823
commit 42c9f507be
No known key found for this signature in database
GPG Key ID: 115D5AB89C5C1E1E

@ -0,0 +1,51 @@
From 7675881c5481d7157c64c6a2a008fac7fbf5c495 Mon Sep 17 00:00:00 2001
From: Tomas Kopecek <tkopecek@redhat.com>
Date: Jan 15 2021 11:56:31 +0000
Subject: [PATCH 1/2] kojid: backward compatible hub call
Fixes: https://pagure.io/koji/issue/2648
---
diff --git a/builder/kojid b/builder/kojid
index 7f4557a..ca33a00 100755
--- a/builder/kojid
+++ b/builder/kojid
@@ -1328,7 +1328,12 @@ class BuildArchTask(BaseBuildTask):
weight is scaled from a minimum of 1.5 to a maximum of 6, based on
the average duration of a build of this package.
"""
- avg = self.session.getAverageBuildDuration(name, age=6)
+ try:
+ avg = self.session.getAverageBuildDuration(name, age=6)
+ except ParameterError:
+ # for hub < 1.23
+ avg = self.session.getAverageBuildDuration(name)
+
if not avg:
return
if avg < 0:
From a53aa56b87a569ccb8eb3173f7eddfe86b2dfea2 Mon Sep 17 00:00:00 2001
From: Tomas Kopecek <tkopecek@redhat.com>
Date: Jan 15 2021 15:23:44 +0000
Subject: [PATCH 2/2] typo
---
diff --git a/builder/kojid b/builder/kojid
index ca33a00..b503405 100755
--- a/builder/kojid
+++ b/builder/kojid
@@ -1330,7 +1330,7 @@ class BuildArchTask(BaseBuildTask):
"""
try:
avg = self.session.getAverageBuildDuration(name, age=6)
- except ParameterError:
+ except koji.ParameterError:
# for hub < 1.23
avg = self.session.getAverageBuildDuration(name)

@ -9,7 +9,7 @@
Name: koji Name: koji
Version: 1.23.0 Version: 1.23.0
Release: 2%{?dist} Release: 3%{?dist}
# the included arch lib from yum's rpmUtils is GPLv2+ # the included arch lib from yum's rpmUtils is GPLv2+
License: LGPLv2 and GPLv2+ License: LGPLv2 and GPLv2+
Summary: Build system tools Summary: Build system tools
@ -18,6 +18,7 @@ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2
# Patches already upstream # Patches already upstream
Patch1: https://pagure.io/koji/pull-request/2579.patch Patch1: https://pagure.io/koji/pull-request/2579.patch
Patch2: https://pagure.io/koji/pull-request/2649.patch
# Not upstreamable # Not upstreamable
Patch100: fedora-config.patch Patch100: fedora-config.patch
@ -339,6 +340,9 @@ done
%systemd_postun kojira.service %systemd_postun kojira.service
%changelog %changelog
* Sun Jan 17 2021 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.23.0-3
- Fixup compatibility of kojid with koji-hub 1.21
* Mon Nov 30 2020 Kevin Fenzi <kevin@scrye.com> - 1.23.0-2 * Mon Nov 30 2020 Kevin Fenzi <kevin@scrye.com> - 1.23.0-2
- Fix 32 bit arm install issue. Fixes bug #1894261 - Fix 32 bit arm install issue. Fixes bug #1894261

Loading…
Cancel
Save