Fix symlink_if_latest() logic

Currently, the latest symlink is never updated.
epel9^2
Igor Raits 3 months ago
parent 9a9c0acdca
commit c7a8698be7
No known key found for this signature in database
GPG Key ID: 115D5AB89C5C1E1E

@ -0,0 +1,25 @@
From a0498970e73384a3bce62bc28f5f98f4feeabaff Mon Sep 17 00:00:00 2001
From: Igor Raits <igor.raits@gmail.com>
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:

@ -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

Loading…
Cancel
Save