contrib/packit-tmt: handle missing testing-farm repo

Check for testing-farm-tag-repository before passing --disable-repo to dnf.
This prevents the dependency upgrade from failing when Testing Farm did
not create the repository.

Fixes: #28452

Signed-off-by: rsvr76 <vishnuramrs07@gmail.com>
This commit is contained in:
rsvr76 committed 2026-08-19 21:20:51 +05:30
1 parent 4edc8d68e3
commit e033c0521b
1 file changed
+6 -1
+6 -1
View File
@@ -2,6 +2,11 @@
set -exo pipefail
DISABLE_REPO=()
if grep -s -r -q -F '[testing-farm-tag-repository]' /etc/yum.repos.d 2>/dev/null; then
DISABLE_REPO=(--disable-repo=testing-farm-tag-repository)
fi
# This should work even when podman-next isn't installed. It'll fetch the
# highest versions available across all repos.
dnf -y upgrade --allowerasing --disable-repo=testing-farm-tag-repository --exclude=podman*
dnf -y upgrade --allowerasing "${DISABLE_REPO[@]}" --exclude=podman*