From 68fa338e34d64f6f8e5e8b293f8318d79e743805 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 10 Feb 2020 11:14:53 +0100 Subject: [PATCH] contrib/REQUIRED_PACKAGES: fix script to work without GNU `which` installed `which` is convenient, but not installed in Fedora container images. Fix detection of whether to use `dnf` or `yum`. (cherry picked from commit 5cc8ca4038454bdf5c7be205396433362d12b839) --- contrib/fedora/REQUIRED_PACKAGES | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/fedora/REQUIRED_PACKAGES b/contrib/fedora/REQUIRED_PACKAGES index 7daf8d1013..eb2404a170 100755 --- a/contrib/fedora/REQUIRED_PACKAGES +++ b/contrib/fedora/REQUIRED_PACKAGES @@ -12,7 +12,7 @@ set -xe -DNF="$(which dnf &>/dev/null && echo dnf || echo yum)" +DNF="$( ( which dnf || dnf --version ) &>/dev/null && echo dnf || echo yum)" install() { if [ "$NM_INSTALL" != "" ]; then @@ -81,6 +81,7 @@ install \ vala-devel \ vala-tools \ valgrind \ + which \ "${EXTRA_PACKAGES[@]}" # some packages don't exist in certain distributions. Install them one-by-one, and ignore errors.