From b1f8f91095900d9ecd71df9d9eac7caea373f522 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 6 Nov 2024 08:55:42 -0500 Subject: [PATCH] ci: Adapt to dnf5's builddep incompatibility xref https://github.com/rpm-software-management/dnf5/issues/799 --- ci/installdeps.sh | 2 +- ci/libbuild.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ci/installdeps.sh b/ci/installdeps.sh index bee6486181..4035ff87ac 100755 --- a/ci/installdeps.sh +++ b/ci/installdeps.sh @@ -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 diff --git a/ci/libbuild.sh b/ci/libbuild.sh index 1b34092458..2baa542cfa 100644 --- a/ci/libbuild.sh +++ b/ci/libbuild.sh @@ -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