there is chance that the system already have epel-release-latest-7.noarch.rpm
installed, in that case, install-deps.sh should not fail.
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
45a4173bcfe15a9bf56f6aeb6e6c35386a00d1c5)
if test $ID = rhel ; then
$SUDO yum-config-manager --enable rhel-$MAJOR_VERSION-server-optional-rpms
fi
- $SUDO yum install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-$MAJOR_VERSION.noarch.rpm
+ rpm --quiet --query epel-release || \
+ $SUDO yum -y install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-$MAJOR_VERSION.noarch.rpm
$SUDO rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$MAJOR_VERSION
$SUDO rm -f /etc/yum.repos.d/dl.fedoraproject.org*
if test $ID = centos -a $MAJOR_VERSION = 7 ; then