From b21515298b38638ee9e02866253ec276e97e0467 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Thu, 23 Nov 2023 10:11:44 +0100 Subject: [PATCH] Try downloading SRPM from koji if dnf fails --- integration/upstream-tests/main.fmf | 1 + integration/upstream-tests/test.sh | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/integration/upstream-tests/main.fmf b/integration/upstream-tests/main.fmf index 79ef998..daeca78 100644 --- a/integration/upstream-tests/main.fmf +++ b/integration/upstream-tests/main.fmf @@ -20,6 +20,7 @@ require: - integritysetup - iscsi-initiator-utils - jq + - koji - lvm2 - make - mdadm diff --git a/integration/upstream-tests/test.sh b/integration/upstream-tests/test.sh index 4530ae3..32b740e 100755 --- a/integration/upstream-tests/test.sh +++ b/integration/upstream-tests/test.sh @@ -29,7 +29,10 @@ if [[ -n "${PACKIT_TARGET_URL:-}" ]]; then git log -1 else # If we're running outside of Packit, download SRPM for the currently installed build - dnf download --source "$(rpm -q systemd)" + if ! dnf download --source "$(rpm -q systemd)"; then + # If the build is recent enough it might not be on the mirrors yet, so try koji as well + koji download-build --arch=src "$(rpm -q systemd --qf "%{sourcerpm}")" + fi dnf builddep -y ./systemd-*.src.rpm rpmbuild --nodeps --define="_topdir $PWD" -rp ./systemd-*.src.rpm # Little hack to get to the correct directory without having to figure out