1
0
forked from pool/build-compare
OBS User unknown 2009-02-06 14:22:35 +00:00 committed by Git OBS Bridge
parent b6063fbb7c
commit 95232997a4
4 changed files with 46 additions and 7 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Feb 5 17:34:29 CET 2009 - coolo@suse.de
- fix 2 bugs
- don't ignore source rpms - changed sources should output
changed source rpms, no matter if they create the same binaries
(think of changed copyright header in spec files)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 27 14:27:19 CET 2009 - adrian@suse.de Tue Jan 27 14:27:19 CET 2009 - adrian@suse.de

View File

@ -24,7 +24,7 @@ Group: Development/Tools/Building
AutoReqProv: on AutoReqProv: on
Summary: Build Result Compare Script Summary: Build Result Compare Script
Version: 2009.01.27 Version: 2009.01.27
Release: 2 Release: 3
Source: same-build-result.sh Source: same-build-result.sh
Source1: rpm-check.sh Source1: rpm-check.sh
Source2: COPYING Source2: COPYING
@ -54,6 +54,11 @@ install -m 0644 %SOURCE2 $RPM_BUILD_ROOT/%_defaultdocdir/%name/
/usr/lib/build /usr/lib/build
%changelog %changelog
* Thu Feb 05 2009 coolo@suse.de
- fix 2 bugs
- don't ignore source rpms - changed sources should output
changed source rpms, no matter if they create the same binaries
(think of changed copyright header in spec files)
* Tue Jan 27 2009 adrian@suse.de * Tue Jan 27 2009 adrian@suse.de
- Create initial package based on the work of Matz and Coolo - Create initial package based on the work of Matz and Coolo
This package provides script for the main build script to be able This package provides script for the main build script to be able

View File

@ -193,7 +193,7 @@ check_single_file()
sed -i -e "s,new/,," $file2 sed -i -e "s,new/,," $file2
if ! diff -u $file1 $file2 > $dfile; then if ! diff -u $file1 $file2 > $dfile; then
echo "$file differs in assembler output" echo "$file differs in assembler output"
head -n 2000 $dfile head -n 200 $dfile
ret=1 ret=1
break break
fi fi
@ -213,7 +213,7 @@ check_single_file()
*ASCII*|*text*) *ASCII*|*text*)
if ! cmp -s old/$file new/$file; then if ! cmp -s old/$file new/$file; then
echo "$file differs ($ftype)" echo "$file differs ($ftype)"
diff -u old/$file1 new/$file2 | head -n 200 diff -u old/$file new/$file | head -n 200
ret=1 ret=1
break break
fi fi

View File

@ -26,16 +26,42 @@ if [ -z "$NEWDIRS" ]; then
exit 1 exit 1
fi fi
#OLDRPMS=($(find "$OLDDIR" -name \*src.rpm|sort) $(find "$OLDDIR" -name \*rpm -a ! -name \*src.rpm|sort)) if test `find $NEWDIRS -name *.rpm | wc -l` != `find $OLDDIR -name *.rpm | wc -l`; then
#NEWRPMS=($(find $NEWDIRS -name \*src.rpm|sort) $(find $NEWDIRS -name \*rpm -a ! -name \*src.rpm|sort)) echo "different number of subpackages"
# Exclude src rpms for now: find $OLDDIR $NEWDIRS -name *.rpm
exit 1
fi
osrpm=$(find "$OLDDIR" -name \*src.rpm)
nsrpm=$(find $NEWDIRS -name \*src.rpm)
if test ! -f "$osrpm"; then
echo no old source rpm in $OLDDIR
exit 1
fi
if test ! -f "$nsrpm"; then
echo no new source rpm in $NEWDIRS
exit 1
fi
echo "compare $osrpm $nsrpm"
bash $CMPSCRIPT "$osrpm" "$nsrpm" || exit 1
OLDRPMS=($(find "$OLDDIR" -name \*rpm -a ! -name \*src.rpm|sort)) OLDRPMS=($(find "$OLDDIR" -name \*rpm -a ! -name \*src.rpm|sort))
NEWRPMS=($(find $NEWDIRS -name \*rpm -a ! -name \*src.rpm|sort)) NEWRPMS=($(find $NEWDIRS -name \*rpm -a ! -name \*src.rpm|sort))
for opac in "$OLDRPMS"; do rpmqp="rpm -qp --qf --nodigest --nosignature %{NAME}"
for opac in ${OLDRPMS[*]}; do
npac=${NEWRPMS[0]} npac=${NEWRPMS[0]}
NEWRPMS=(${NEWRPMS[@]:1}) # shift NEWRPMS=(${NEWRPMS[@]:1}) # shift
echo compare "$opac" "$npac" echo compare "$opac" "$npac"
oname=`$rpmqp $opac`
nname=`$rpmqp $npac`
if test "$oname" != "$nname"; then
echo "names differ: $oname $nname"
exit 1
fi
bash $CMPSCRIPT "$opac" "$npac" || exit 1 bash $CMPSCRIPT "$opac" "$npac" || exit 1
done done