Skip to content

Commit

Permalink
ci: Adapt to dnf5's builddep incompatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
cgwalters committed Nov 6, 2024
1 parent 9d0c4ff commit b1f8f91
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ci/installdeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if [ -z "${SKIP_INSTALLDEPS:-}" ] && test $(id -u) -eq 0; then
dnf -y install dnf-plugins-core
# we have the canonical spec file handy so just builddep from that
# XXX: use --allowerasing as a temporary hack to ease the migration to libmodulemd2
time dnf builddep --spec -y packaging/rpm-ostree.spec --allowerasing
pkg_builddep_spec --allowerasing packaging/rpm-ostree.spec

osid="$(. /etc/os-release && echo $ID)"
if [ "${osid}" == centos ]; then
Expand Down
8 changes: 8 additions & 0 deletions ci/libbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ pkg_install() {
echo "Done running dnf -y install! $(date)"
}

pkg_builddep_spec() {
if test -x /usr/bin/dnf5; then
dnf builddep -y "$@"
else
dnf builddep -y --spec "$@"
fi
}

pkg_builddep() {
# This is sadly the only case where it's a different command
if test -x /usr/bin/dnf; then
Expand Down

0 comments on commit b1f8f91

Please sign in to comment.