Accepting request 106406 from home:a_jaeger:branches:build-compare-test

Quote dot in release to not have false matches

OBS-URL: https://build.opensuse.org/request/show/106406
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=123
This commit is contained in:
Andreas Jaeger 2012-02-22 07:49:21 +00:00 committed by Git OBS Bridge
parent f139ea5c41
commit d521ef89cd
4 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Feb 18 18:27:40 UTC 2012 - aj@suse.de
- Quote dot in release to not have false matches.
-------------------------------------------------------------------
Thu Feb 16 21:00:31 UTC 2012 - coolo@suse.com

View File

@ -16,6 +16,7 @@
#
Name: build-compare
Summary: Build Result Compare Script
License: GPL-2.0+

View File

@ -87,8 +87,9 @@ function cmp_spec ()
return 1
fi
release1=`$RPM --qf "%{RELEASE}" "$oldrpm"`
release2=`$RPM --qf "%{RELEASE}" "$newrpm"`
# Remember to quote the . which is in release
release1=`$RPM --qf "%{RELEASE}" "$oldrpm"|sed -e 's/\./\\./g'`
release2=`$RPM --qf "%{RELEASE}" "$newrpm"|sed -e 's/\./\\./g'`
# This might happen with a forced rebuild of factory
if [ "${release1%.*}" != "${release2%.*}" ] ; then
echo "release prefix mismatch"

View File

@ -63,8 +63,9 @@ 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[0]}"`
release2=`rpm -qp --nodigest --nosignature --qf "%{RELEASE}" "${NEWRPMS[0]}"`
# Remember to quote the "." for future regexes
release1=`rpm -qp --nodigest --nosignature --qf "%{RELEASE}" "${OLDRPMS[0]}"|sed -e 's/\./\\./g'`
release2=`rpm -qp --nodigest --nosignature --qf "%{RELEASE}" "${NEWRPMS[0]}"|sed -e 's/\./\\./g'`
SUCCESS=1
rpmqp='rpm -qp --qf %{NAME} --nodigest --nosignature '