forked from pool/build-compare
Accepting request 105426 from openSUSE:Tools
- !unchanged if rpmlint.log was new created - !unchanged if appdata.xml was new or updated OBS-URL: https://build.opensuse.org/request/show/105426 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/build-compare?expand=0&rev=65
This commit is contained in:
commit
d3c7f9d12f
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -90,23 +90,39 @@ 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
|
||||
diff -u0 $file1 $file2 |head -n 20
|
||||
diff -u $OLDDIR/rpmlint.log $OTHERDIR/rpmlint.log |head -n 20
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user