Switch to dnf when it exists

This has all been around for a *long* time, like when dnf was a weird
new thing.  Now it's the opposite and yum is a weird old thing :)
Choose it by default for platforms with it (Fedora, for now).

Change-Id: Id2bd7d145354b996de31944929fd0267ec24a08e
(cherry picked from commit 7f33552d34)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Ian Wienand 2018-06-14 21:11:10 +10:00 committed by Paul Belanger
parent c246367db0
commit cd517afc6d
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
1 changed files with 8 additions and 5 deletions

13
stackrc
View File

@ -827,11 +827,14 @@ SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT=${SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT:-5}
# Service graceful shutdown timeout
WORKER_TIMEOUT=${WORKER_TIMEOUT:-90}
# Support alternative yum -- in future Fedora 'dnf' will become the
# only supported installer, but for now 'yum' and 'dnf' are both
# available in parallel with compatible CLIs. Allow manual switching
# till we get to the point we need to handle this automatically
YUM=${YUM:-yum}
# Choose DNF on RedHat/Fedora platforms with it, or otherwise default
# to YUM. Can remove this when only dnf is supported (i.e. centos7
# disappears)
if [[ -e /usr/bin/dnf ]]; then
YUM=${YUM:-dnf}
else
YUM=${YUM:-yum}
fi
# Common Configuration
# --------------------