Merge "Use $YUM instead of direct calls in more places"
This commit is contained in:
commit
132bfb086e
@ -8,7 +8,7 @@ set -o pipefail
|
|||||||
|
|
||||||
if [[ ${DISTRO_NAME} =~ "centos" ]]; then
|
if [[ ${DISTRO_NAME} =~ "centos" ]]; then
|
||||||
# Centos has "epel-release" in extras, which is default enabled.
|
# Centos has "epel-release" in extras, which is default enabled.
|
||||||
yum install -y epel-release
|
${YUM} install -y epel-release
|
||||||
else
|
else
|
||||||
# For RHEL, we have to scrape the download page to find the latest
|
# For RHEL, we have to scrape the download page to find the latest
|
||||||
# release and install that
|
# release and install that
|
||||||
@ -34,7 +34,11 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${DIB_EPEL_DISABLED:-0} -ne 0 ]; then
|
if [ ${DIB_EPEL_DISABLED:-0} -ne 0 ]; then
|
||||||
yum-config-manager --disable epel
|
if [[ ${YUM} == "dnf" ]]; then
|
||||||
|
dnf config-manager --set-disabled epel
|
||||||
|
else
|
||||||
|
yum-config-manager --disable epel
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DIB_EPEL_MIRROR=${DIB_EPEL_MIRROR:-}
|
DIB_EPEL_MIRROR=${DIB_EPEL_MIRROR:-}
|
||||||
|
@ -28,7 +28,7 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $DISTRO_NAME == "fedora" ]]; then
|
if [[ ${YUM} == "dnf" ]]; then
|
||||||
mkdir -p /etc/dnf/vars
|
mkdir -p /etc/dnf/vars
|
||||||
echo $basearch > /etc/dnf/vars/basearch
|
echo $basearch > /etc/dnf/vars/basearch
|
||||||
echo $arch > /etc/dnf/vars/arch
|
echo $arch > /etc/dnf/vars/arch
|
||||||
@ -43,5 +43,5 @@ if [[ ${DISTRO_NAME} =~ "centos" ]]; then
|
|||||||
else
|
else
|
||||||
contentdir=altarch
|
contentdir=altarch
|
||||||
fi
|
fi
|
||||||
echo $contentdir > /etc/yum/vars/contentdir
|
echo $contentdir > /etc/${YUM}/vars/contentdir
|
||||||
fi
|
fi
|
||||||
|
@ -6,7 +6,7 @@ fi
|
|||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 22 ]]; then
|
if [[ ${YUM} == "dnf" ]]; then
|
||||||
cfg=/etc/dnf/dnf.conf
|
cfg=/etc/dnf/dnf.conf
|
||||||
cachedir=/var/cache/dnf
|
cachedir=/var/cache/dnf
|
||||||
else
|
else
|
||||||
|
@ -6,7 +6,7 @@ fi
|
|||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 22 ]]; then
|
if [[ ${YUM} == "dnf" ]]; then
|
||||||
# dnf is slightly different; doesn't have these by default
|
# dnf is slightly different; doesn't have these by default
|
||||||
cfg=/etc/dnf/dnf.conf
|
cfg=/etc/dnf/dnf.conf
|
||||||
echo "keepcache=1" >> $cfg
|
echo "keepcache=1" >> $cfg
|
||||||
|
Loading…
Reference in New Issue
Block a user