- if test -e $OLDDIR/rpmlint.log -a -e $OTHERDIR/rpmlint.log; then
- file1=`mktemp`
- file2=`mktemp`
- echo "comparing $OLDDIR/rpmlint.log and $OTHERDIR/rpmlint.log"
- # Sort the files first since the order of messages is not deterministic
- # Remove release from files
- sort -u $OLDDIR/rpmlint.log|sed -e "s,$ver_rel1,@VERSION@-@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file1
- sort -u $OTHERDIR/rpmlint.log|sed -e "s,$ver_rel2,@VERSION@-@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file2
- if ! cmp -s $file1 $file2; then
- echo "rpmlint.log files differ:"
- diff -u $file1 $file2 |head -n 20
+ if [ $prerelease -eq 1 ] ; then
+ echo "do not compare rpmlint.log if it is a prerelease project!"
+ else
+ if test -e $OLDDIR/rpmlint.log -a -e $OTHERDIR/rpmlint.log; then
+ file1=`mktemp`
+ file2=`mktemp`
+ echo "comparing $OLDDIR/rpmlint.log and $OTHERDIR/rpmlint.log"
+ # Sort the files first since the order of messages is not deterministic
+ # Remove release from files
+ sort -u $OLDDIR/rpmlint.log|sed -e "s,$ver_rel1,@VERSION@-@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file1
+ sort -u $OTHERDIR/rpmlint.log|sed -e "s,$ver_rel2,@VERSION@-@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file2
+ if ! cmp -s $file1 $file2; then
+ echo "rpmlint.log files differ:"
+ diff -u $file1 $file2 |head -n 20
+ SUCCESS=0
+ fi
+ rm $file1 $file2
+ elif test -e $OTHERDIR/rpmlint.log; then
+ echo "rpmlint.log is new"