scripts: install-deps: Enable the EPEL repo when running in OpenStack CI

The nodes in the OpenStack CI may already have the epel repo present
but it could be disabled by default. As such, try to enable it as
early as possible.

Change-Id: Ib06f5aaf7f577d101b5b87f8cd81441380e56783
This commit is contained in:
Markos Chandras 2017-06-23 11:47:13 +01:00
parent adc20dc59d
commit 4d0203bc46

View File

@ -79,6 +79,15 @@ else
echo "ERROR: Supported package manager not found. Supported: apt, dnf, yum, zypper"
fi
# if running in OpenStack CI, then make sure epel is enabled
# since it may already be present (but disabled) on the host
if env | grep -q ^ZUUL; then
if [[ -x '/usr/bin/yum' ]]; then
${INSTALLER_CMD} yum-utils
sudo yum-config-manager --enable epel || true
fi
fi
if ! $(python --version &>/dev/null); then
${INSTALLER_CMD} ${PKG_MAP[python]}
fi