diff --git a/SOURCES/0001-repos-check-for-newer-create-event.patch b/SOURCES/0001-repos-check-for-newer-create-event.patch new file mode 100644 index 0000000..8f227cd --- /dev/null +++ b/SOURCES/0001-repos-check-for-newer-create-event.patch @@ -0,0 +1,25 @@ +From a0498970e73384a3bce62bc28f5f98f4feeabaff Mon Sep 17 00:00:00 2001 +From: Igor Raits +Date: Nov 05 2024 13:53:22 +0000 +Subject: repos: check for newer create event + + +When the repo was just created, it has create_event that is the same as +we are checking so the repo will never be considered latest. + +--- + +diff --git a/kojihub/repos.py b/kojihub/repos.py +index 5fc08ed..9a7fd03 100644 +--- a/kojihub/repos.py ++++ b/kojihub/repos.py +@@ -333,7 +333,7 @@ def symlink_if_latest(repo): + clauses = [ + ['tag_id', '=', repo['tag_id']], + ['state', '=', koji.REPO_READY], +- ['create_event', '>=', repo['create_event']]] ++ ['create_event', '>', repo['create_event']]] + if repo['dist']: + clauses.append(['dist', 'IS', True]) + else: + diff --git a/SPECS/koji.spec b/SPECS/koji.spec index a69d67e..f9503c1 100644 --- a/SPECS/koji.spec +++ b/SPECS/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.35.1 -Release: 2%{?dist} +Release: 3%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ # Automatically converted from old format: LGPLv2 and GPLv2+ - review is highly recommended. License: LicenseRef-Callaway-LGPLv2 AND GPL-2.0-or-later @@ -17,6 +17,8 @@ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 +Patch1: https://pagure.io/koji/pull-request/4258.patch#/0001-repos-check-for-newer-create-event.patch + # Not upstreamable Patch100: fedora-config.patch Patch101: pr4228-wait-repo-current.patch