Skip to content

Commit

Permalink
Workaround copr runtime dependency repo
Browse files Browse the repository at this point in the history
Followup fedora-llvm-team#670. Reimplement without using a specific dnf.
Replace the unexpanded $distname variable in the script
  • Loading branch information
Jesus Checa Hidalgo committed Aug 27, 2024
1 parent 9b73f1e commit 4a15d72
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/snapshot-gating.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4a15d72

Please sign in to comment.