From e691d28caed84f060f21020399230cbfde5f27c4 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Fri, 17 Jan 2025 11:57:18 -0500 Subject: [PATCH] target check makes no sense for dist repos --- util/kojira | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/util/kojira b/util/kojira index 36a3c08e..f20f11df 100755 --- a/util/kojira +++ b/util/kojira @@ -149,7 +149,7 @@ class ManagedRepo(object): if self.data['end_event'] is None and not self.data['custom_opts']: # repo is current and has default options. keep it - # this covers dist repos, where custom_opts=None + # this covers current dist repos, where custom_opts=None return # keep repos for configured lifetime @@ -166,9 +166,13 @@ class ManagedRepo(object): return self.expire_check_ts = time.time() - # keep latest default repo for build tags, even if not current - if not self.data['custom_opts']: - # this covers dist repos, where custom_opts=None + # keep latest default repo in some cases, even if not current + if self.dist: + # no target check -- they are irrelevant for dist repos + if self.is_latest(): + return + elif not self.data['custom_opts']: + # normal repo, default options targets = self.session.getBuildTargets(buildTagID=self.data['tag_id']) if targets and self.is_latest(): return