Skip to content

Commit

Permalink
Add support for dnf5 which is now in Fedora rawhide.
Browse files Browse the repository at this point in the history
  • Loading branch information
adelton committed May 17, 2024
1 parent e86bb2e commit 22ce6fe
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions tests/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,20 @@
set -e
set -x

DNF=yum
BUILDDEP_PROVIDER=yum-utils
BUILDDEP=yum-builddep
if type dnf 2> /dev/null ; then
if type dnf5 2> /dev/null ; then
DNF=dnf
BUILDDEP_PROVIDER='dnf5-command(builddep)'
BUILDDEP='dnf builddep'
elif type dnf 2> /dev/null ; then
DNF=dnf
BUILDDEP_PROVIDER='dnf-command(builddep)'
BUILDDEP='dnf builddep'
elif type yum 2> /dev/null ; then
DNF=yum
BUILDDEP_PROVIDER=yum-utils
BUILDDEP=yum-builddep
else
exit 1
fi

$DNF install -y rpm-build "$BUILDDEP_PROVIDER"
Expand Down

0 comments on commit 22ce6fe

Please sign in to comment.