From 1c5c33658ac5c6c77e6f835d2c3a8c6ea7c3acdb Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Tue, 27 Aug 2024 14:52:22 +0200 Subject: [PATCH] Workaround copr runtime dependency repo Followup #670. Reimplement without using a specific dnf. Replace the unexpanded $distname variable in the script --- tests/snapshot-gating.fmf | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/snapshot-gating.fmf b/tests/snapshot-gating.fmf index 98b76df..0d5f448 100644 --- a/tests/snapshot-gating.fmf +++ b/tests/snapshot-gating.fmf @@ -10,13 +10,17 @@ summary: LLVM Tests for snapshot gating prepare: - # dnf5's copr plugin has trouble resolving the runtime dependency repos, so - # we need to use dnf4. Check https://github.com/fedora-copr/copr/issues/3387 - name: Enable copr repo how: shell - script: | - dnf install -y dnf-plugins-core - dnf-3 -y copr enable @fedora-llvm-team/$COPR_PROJECT $COPR_CHROOT + script: + - dnf install -y 'dnf5-command(copr)' || dnf install -y 'dnf-command(copr)' + - dnf -y copr enable @fedora-llvm-team/$COPR_PROJECT $COPR_CHROOT + # dnf5's copr plugin has trouble resolving the runtime dependency repos, + # and is not replacing the $distname special var. Hence we need to do that + # parsing ourselves. + # Check https://github.com/fedora-copr/copr/issues/3387 + - sed -i "s/\$distname/$(echo "$COPR_CHROOT" | cut -d '-' -f 1)/" /etc/yum.repos.d/*$COPR_PROJECT* + # Lower the priority of the testing-farm-tag-repository so that our copr repo is picked up. # See: https://docs.testing-farm.io/Testing%20Farm/0.1/test-environment.html#_tag_repository - how: shell