diff --git a/build-compare.changes b/build-compare.changes index ba3307f..61690fb 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 20 08:49:39 UTC 2012 - aj@suse.de + +- Sort rpmlint.log files first since the order is non-deterministic. + ------------------------------------------------------------------- Thu Jan 12 12:59:31 UTC 2012 - aj@suse.de diff --git a/same-build-result.sh b/same-build-result.sh index ecaa7bb..47f3fe7 100644 --- a/same-build-result.sh +++ b/same-build-result.sh @@ -90,11 +90,16 @@ RPMLINTDIR=/home/abuild/rpmbuild/OTHER if test -e $OLDDIR/rpmlint.log -a -e $RPMLINTDIR/rpmlint.log; then echo "comparing $OLDDIR/rpmlint.log and $RPMLINTDIR/rpmlint.log" - if ! cmp -s $OLDDIR/rpmlint.log $RPMLINTDIR/rpmlint.log; then + # Sort the files first since the order of messages is not deterministic + sort -u $OLDDIR/rpmlint.log > $OLDDIR/rpmlint.log.sorted + sort -u $RPMLINTDIR/rpmlint.log > $RPMLINTDIR/rpmlint.log.sorted + if ! cmp -s $OLDDIR/rpmlint.log.sorted $RPMLINTDIR/rpmlint.log.sorted; then echo "rpmlint.log files differ:" diff -u $OLDDIR/rpmlint.log $RPMLINTDIR/rpmlint.log|head -n 20 + rm $OLDDIR/rpmlint.log.sorted $RPMLINTDIR/rpmlint.log.sorted exit 1 fi + rm $OLDDIR/rpmlint.log.sorted $RPMLINTDIR/rpmlint.log.sorted fi if test $SUCCESS -eq 0; then