From 4d0203bc46b4b251586bf7dce2c3e482aaecb32e Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Fri, 23 Jun 2017 11:47:13 +0100 Subject: [PATCH] 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 --- scripts/install-deps.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/install-deps.sh b/scripts/install-deps.sh index 1e88cb168..c6679c16f 100644 --- a/scripts/install-deps.sh +++ b/scripts/install-deps.sh @@ -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