[ghc] abi-check.sh now downloads builds from koji and compares their hashes

Jens Petersen petersen at fedoraproject.org
Mon Mar 23 03:53:04 UTC 2015


commit 164918f8772c67b89346ea6fc26c0729e6acf21f
Author: Jens Petersen <petersen at redhat.com>
Date:   Mon Mar 23 12:50:33 2015 +0900

    abi-check.sh now downloads builds from koji and compares their hashes

 abi-check.sh | 54 ++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 44 insertions(+), 10 deletions(-)
---
diff --git a/abi-check.sh b/abi-check.sh
index f2a47fd..fc428f0 100755
--- a/abi-check.sh
+++ b/abi-check.sh
@@ -1,14 +1,48 @@
 #!/bin/sh
 
-REL=$(rpm -q --qf "%{release}" ghc-compiler)
-ARCH=$(arch)
-PKGS=$(rpm -qa | grep -- -$REL | grep -v -- -devel | sort | sed -e "s/-[0-9.]\+-.*//")
-
-for i in $PKGS; do
-    LOCAL=$(rpm -q --provides $i | grep ^ghc\( | grep -v =)
-    REPO=$(dnf repoquery -q --provides $i | grep ^ghc\( | grep -v = | sort | uniq)
-    if [ "$LOCAL" != "$REPO" ]; then
-        echo $LOCAL
-        echo $REPO
+[ $# -ne 2 ] && echo "Usage: $(basename $0) ver-rel1 ver-rel2" && exit 1
+
+if [ "$1" = "$2" ]; then
+    echo "ver-rel's must be different!"
+    exit 1
+fi
+
+#set -x
+
+mkdir -p koji
+cd koji
+
+for i in $1 $2; do
+    if [ ! -d "$i" ]; then
+        mkdir -p $i/{x86_64,i686,armv7hl}
+        cd $i
+        for a in x86_64 i686 armv7hl; do
+            cd $a
+            koji download-build --arch=$a ghc-$i
+            cd ..
+        done
+        cd ..
     fi
 done
+
+for a in x86_64 i686 armv7hl; do
+    echo "= $a ="
+    for i in $1/$a/*; do
+        PKGVER=$(rpm -qp --qf "%{name}-%{version}" $i)
+        PKG2=$(ls $2/$a/$PKGVER*.$a.rpm)
+        PROV1=$(rpm -qp --provides $i | grep ^ghc\( | grep -v =)
+        PROV2=$(rpm -qp --provides $PKG2 | grep ^ghc\( | grep -v =)
+#        if [ -n "$PROV1" ]; then
+#            echo $PROV1
+#        else
+#            echo "no provides for $i"
+#        fi
+        if [ -n "$PROV2" ]; then
+            if [ "$PROV1" != "$PROV2" ]; then
+                echo $PROV2
+            fi
+#        else
+#            echo "no provides for $PKG2"
+        fi
+    done
+done


More information about the scm-commits mailing list