Fixes apex baremetal deploy case where desired RPM is already installed 93/5693/1
authorTim Rozet <trozet@redhat.com>
Wed, 6 Jan 2016 22:55:04 +0000 (17:55 -0500)
committerTim Rozet <trozet@redhat.com>
Wed, 6 Jan 2016 22:55:04 +0000 (17:55 -0500)
Change-Id: I025a3ad5ab1c3a4eed1306cb58071d7d75a7d9ad
Signed-off-by: Tim Rozet <trozet@redhat.com>
jjb/apex/apex.yml

index b41cedb..ec88031 100644 (file)
 
             # update / install the new rpm
             if rpm -q opnfv-apex > /dev/null; then
-               if sudo yum update -y $RPM_INSTALL_PATH | grep "does not update installed package"; then
+               if [ $(basename $OPNFV_RPM_URL) == $(rpm -q opnfv-apex).rpm ]; then
+                 echo "RPM is already installed"
+               elif sudo yum update -y $RPM_INSTALL_PATH | grep "does not update installed package"; then
                    sudo yum downgrade -y $RPM_INSTALL_PATH;
                fi
             else