From c0275a0a8184aa4d2a6f0a204b73f84cee9025400ea7fcd84833255d326c359d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 6 Feb 2012 12:47:20 +0000 Subject: [PATCH] Accepting request 102885 from home:a_jaeger:branches:build-compare-test Fix bug in rpmlint handling OBS-URL: https://build.opensuse.org/request/show/102885 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=116 --- build-compare.changes | 6 ++++++ same-build-result.sh | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build-compare.changes b/build-compare.changes index f78003a..4bfb868 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 6 11:53:57 UTC 2012 - aj@suse.de + +- Fix off-by-one error in rpmlint processing that hit packages with + just one binary package. + ------------------------------------------------------------------- Sun Feb 5 12:16:49 UTC 2012 - aj@suse.de diff --git a/same-build-result.sh b/same-build-result.sh index 84306b8..1f7e40a 100644 --- a/same-build-result.sh +++ b/same-build-result.sh @@ -63,8 +63,8 @@ OLDRPMS=($(find "$OLDDIR" -name \*rpm -a ! -name \*src.rpm -a ! -name \*.delta. NEWRPMS=($(find $NEWDIRS -name \*rpm -a ! -name \*src.rpm -a ! -name \*.delta.rpm|sort --field-separator=/ --key=7|grep -v -- -32bit-|grep -v -- -64bit-|grep -v -- '-x86-.*\.ia64\.rpm')) # Get release from first RPM and keep for rpmlint check -release1=`rpm -qp --nodigest --nosignature --qf "%{RELEASE}" "${OLDRPMS[1]}"` -release2=`rpm -qp --nodigest --nosignature --qf "%{RELEASE}" "${NEWRPMS[1]}"` +release1=`rpm -qp --nodigest --nosignature --qf "%{RELEASE}" "${OLDRPMS[0]}"` +release2=`rpm -qp --nodigest --nosignature --qf "%{RELEASE}" "${NEWRPMS[0]}"` SUCCESS=1 rpmqp='rpm -qp --qf %{NAME} --nodigest --nosignature ' @@ -98,14 +98,12 @@ if test -e $OLDDIR/rpmlint.log -a -e $RPMLINTDIR/rpmlint.log; then echo "comparing $OLDDIR/rpmlint.log and $RPMLINTDIR/rpmlint.log" # Sort the files first since the order of messages is not deterministic # Remove release from files - echo "Release1 is $release1, Release2 is $release2" 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 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 $RPMLINTDIR/rpmlint.log|head -n 20 SUCCESS=0 fi rm $file1 $file2