Accepting request 105424 from home:coolo:appstream

- !unchanged if rpmlint.log was new created
- !unchanged if appdata.xml was new or updated

OBS-URL: https://build.opensuse.org/request/show/105424
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=118
This commit is contained in:
Stephan Kulow 2012-02-16 14:18:23 +00:00 committed by Git OBS Bridge
parent c0275a0a81
commit 4eee464bef
3 changed files with 29 additions and 7 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Feb 16 13:39:21 UTC 2012 - coolo@suse.com
- !unchanged if rpmlint.log was new created
- !unchanged if appdata.xml was new or updated
-------------------------------------------------------------------
Mon Feb 6 11:53:57 UTC 2012 - aj@suse.de

View File

@ -16,13 +16,12 @@
#
Name: build-compare
Summary: Build Result Compare Script
License: GPL-2.0+
Group: Development/Tools/Building
Summary: Build Result Compare Script
Version: 2012.01.26
Release: 6
Release: 0
Source1: COPYING
Source2: same-build-result.sh
Source3: rpm-check.sh

View File

@ -90,16 +90,16 @@ if [ -n "${NEWRPMS[0]}" ]; then
fi
# Compare rpmlint.log files
RPMLINTDIR=/home/abuild/rpmbuild/OTHER
OTHERDIR=/home/abuild/rpmbuild/OTHER
if test -e $OLDDIR/rpmlint.log -a -e $RPMLINTDIR/rpmlint.log; then
if test -e $OLDDIR/rpmlint.log -a -e $OTHERDIR/rpmlint.log; then
file1=`mktemp`
file2=`mktemp`
echo "comparing $OLDDIR/rpmlint.log and $RPMLINTDIR/rpmlint.log"
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,$release1,@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file1
sort -u $RPMLINTDIR/rpmlint.log|sed -e "s,$release2,@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file2
sort -u $OTHERDIR/rpmlint.log|sed -e "s,$release2,@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file2
if ! cmp -s $file1 $file2; then
echo "rpmlint.log files differ:"
# File is sorted, so don't give context that will confuse readers
@ -107,6 +107,23 @@ if test -e $OLDDIR/rpmlint.log -a -e $RPMLINTDIR/rpmlint.log; then
SUCCESS=0
fi
rm $file1 $file2
elif -e $OTHERDIR/rpmlint.log; then
echo "rpmlint.log is new"
SUCCESS=0
fi
# compare appstream data
if test -e $OLDDIR/appdata.xml -a -e $OTHERDIR/appdata.xml; then
file1=$OLDDIR/appdata.xml
file2=$OTHERDIR/appdata.xml
if ! cmp -s $file1 $file2; then
echo "appdata.xml files differ:"
diff -u0 $file1 $file2 |head -n 20
SUCCESS=0
fi
elif -e $OTHERDIR/appdata.xml; then
echo "appdata.xml is new"
SUCCESS=0
fi
if test $SUCCESS -eq 0; then