ci: Use distro-sync instead of upgrade
authorColin Walters <walters@verbum.org>
Tue, 19 Sep 2017 13:46:17 +0000 (09:46 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 19 Sep 2017 14:29:47 +0000 (14:29 +0000)
This should help ensure that if installing `glibc-devel` downgrades `glibc`
we'll run through our hackround for
<https://bugzilla.redhat.com/show_bug.cgi?id=1394862>.

Closes: #1190
Approved by: jlebon

ci/libbuild.sh

index 0e0240638528d3bbb6e8d5f5da94f5792fca90e2..2b600dc7261b6f32e1f14552a1a9b695dcdfb4bb 100644 (file)
@@ -2,12 +2,13 @@
 
 pkg_upgrade() {
     # https://bugzilla.redhat.com/show_bug.cgi?id=1483553
-    if ! yum -y upgrade 2>err.txt; then
-        ecode=$?
-        if grep -q -F -e "BDB1539 Build signature doesn't match environment" err.txt; then
-            rpm --rebuilddb
-            yum -y upgrade
-        else
+    ecode=0
+    yum -y distro-sync 2>err.txt || ecode=$?
+    if test ${ecode} '!=' 0 && grep -q -F -e "BDB1539 Build signature doesn't match environment" err.txt; then
+        rpm --rebuilddb
+        yum -y distro-sync
+    else
+        if test ${ecode} '!=' 0; then
             cat err.txt
             exit ${ecode}
         fi