File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1162,7 +1162,7 @@ function uninstall_package {
11621162 if is_ubuntu; then
11631163 apt_get purge " $@ "
11641164 elif is_fedora; then
1165- sudo yum remove -y " $@ "
1165+ sudo $YUM remove -y " $@ " || :
11661166 elif is_suse; then
11671167 sudo zypper rm " $@ "
11681168 else
@@ -1171,7 +1171,7 @@ function uninstall_package {
11711171}
11721172
11731173# Wrapper for ``yum`` to set proxy environment variables
1174- # Uses globals ``OFFLINE``, ``*_proxy``
1174+ # Uses globals ``OFFLINE``, ``*_proxy``, ``YUM``
11751175# yum_install package [package ...]
11761176function yum_install {
11771177 [[ " $OFFLINE " = " True" ]] && return
@@ -1183,7 +1183,7 @@ function yum_install {
11831183 # https://bugzilla.redhat.com/show_bug.cgi?id=965567
11841184 $sudo http_proxy=$http_proxy https_proxy=$https_proxy \
11851185 no_proxy=$no_proxy \
1186- yum install -y " $@ " 2>&1 | \
1186+ $YUM install -y " $@ " 2>&1 | \
11871187 awk '
11881188 BEGIN { fail=0 }
11891189 /No package/ { fail=1 }
@@ -1193,7 +1193,7 @@ function yum_install {
11931193
11941194 # also ensure we catch a yum failure
11951195 if [[ ${PIPESTATUS[0]} != 0 ]]; then
1196- die $LINENO " Yum install failure"
1196+ die $LINENO " $YUM install failure"
11971197 fi
11981198}
11991199
Original file line number Diff line number Diff line change @@ -639,6 +639,12 @@ API_WORKERS=${API_WORKERS:=$(( ($(nproc)/2)<2 ? 2 : ($(nproc)/2) ))}
639639# Service startup timeout
640640SERVICE_TIMEOUT=${SERVICE_TIMEOUT:- 60}
641641
642+ # Support alternative yum -- in future Fedora 'dnf' will become the
643+ # only supported installer, but for now 'yum' and 'dnf' are both
644+ # available in parallel with compatible CLIs. Allow manual switching
645+ # till we get to the point we need to handle this automatically
646+ YUM=${YUM:- yum}
647+
642648# Following entries need to be last items in file
643649
644650# Local variables:
You can’t perform that action at this time.
0 commit comments