]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps: do not install if rpm already installed 30612/head
authorKefu Chai <kchai@redhat.com>
Fri, 27 Sep 2019 02:26:54 +0000 (10:26 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 27 Sep 2019 03:07:30 +0000 (11:07 +0800)
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>
install-deps.sh

index 4655955b721a47d2ffbb418d225d790620689266..18bc62c5f5dc55e8006a0a2ab89ad4ac19cf65c6 100755 (executable)
@@ -367,7 +367,8 @@ else
                 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