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

epel9
Jens Petersen 10 years ago
parent ad9efc0b8f
commit 12566624b4

@ -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

Loading…
Cancel
Save