Skip to content

Commit 7f33552

Browse files
committed
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
1 parent aed9300 commit 7f33552

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

stackrc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -819,11 +819,14 @@ SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT=${SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT:-5}
819819
# Service graceful shutdown timeout
820820
WORKER_TIMEOUT=${WORKER_TIMEOUT:-90}
821821

822-
# Support alternative yum -- in future Fedora 'dnf' will become the
823-
# only supported installer, but for now 'yum' and 'dnf' are both
824-
# available in parallel with compatible CLIs. Allow manual switching
825-
# till we get to the point we need to handle this automatically
826-
YUM=${YUM:-yum}
822+
# Choose DNF on RedHat/Fedora platforms with it, or otherwise default
823+
# to YUM. Can remove this when only dnf is supported (i.e. centos7
824+
# disappears)
825+
if [[ -e /usr/bin/dnf ]]; then
826+
YUM=${YUM:-dnf}
827+
else
828+
YUM=${YUM:-yum}
829+
fi
827830

828831
# Common Configuration
829832
# --------------------

0 commit comments

Comments
 (0)