Hello community,

here is the log from the commit of package build-compare for openSUSE:Factory 
checked in at 2012-02-22 15:52:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/build-compare (Old)
 and      /work/SRC/openSUSE:Factory/.build-compare.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "build-compare", Maintainer is "co...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/build-compare/build-compare.changes      
2012-02-16 22:00:44.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.build-compare.new/build-compare.changes 
2012-02-22 15:52:52.000000000 +0100
@@ -1,0 +2,16 @@
+Wed Feb 22 11:12:13 UTC 2012 - a...@suse.de
+
+- Remove release from pre/post scripts.
+
+-------------------------------------------------------------------
+Wed Feb 22 11:07:53 UTC 2012 - co...@suse.com
+
+- I changed my mind, appdata.xml is too hard to get right. So 
+  we need to support variable binary names for the appdata
+
+-------------------------------------------------------------------
+Sat Feb 18 18:27:40 UTC 2012 - a...@suse.de
+
+- Quote dot in release to not have false matches.
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ build-compare.spec ++++++
--- /var/tmp/diff_new_pack.EZ8eij/_old  2012-02-22 15:52:53.000000000 +0100
+++ /var/tmp/diff_new_pack.EZ8eij/_new  2012-02-22 15:52:53.000000000 +0100
@@ -16,6 +16,7 @@
 #
 
 
+
 Name:           build-compare
 Summary:        Build Result Compare Script
 License:        GPL-2.0+

++++++ functions.sh ++++++
--- /var/tmp/diff_new_pack.EZ8eij/_old  2012-02-22 15:52:53.000000000 +0100
+++ /var/tmp/diff_new_pack.EZ8eij/_new  2012-02-22 15:52:53.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/bash
 #
-# Copyright (c) 2009, 2010, 2011 SUSE Linux Product GmbH, Germany.
+# Copyright (c) 2009, 2010, 2011, 2012 SUSE Linux Product GmbH, Germany.
 # Licensed under GPL v2, see COPYING file for details.
 #
 # Written by Michael Matz and Stephan Coolo
@@ -62,8 +62,7 @@
     QF="$QF %{EXCLUSIVEOS} %{RPMVERSION} %{PLATFORM}\\n"
     QF="$QF %{PAYLOADFORMAT} %{PAYLOADCOMPRESSOR} %{PAYLOADFLAGS}\\n"
     
-    QF="$QF [%{PREINPROG} %{PREIN}\\n]\\n[%{POSTINPROG} 
%{POSTIN}\\n]\\n[%{PREUNPROG} %{PREUN}\\n]\\n[%{POSTUNPROG} %{POSTUN}\\n]\\n"
-    
+ 
     # XXX We also need to check the existence (but not the content (!))
     # of SIGGPG (and perhaps the other SIG*)
     
@@ -87,8 +86,9 @@
       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"
@@ -101,6 +101,16 @@
     if ! diff -au $file1 $file2; then
       rm $file1 $file2
       return 1
+    fi
+
+    # scripts, might contain release number
+    QF="[%{PREINPROG} %{PREIN}\\n]\\n[%{POSTINPROG} 
%{POSTIN}\\n]\\n[%{PREUNPROG} %{PREUN}\\n]\\n[%{POSTUNPROG} %{POSTUN}\\n]\\n"
+    check_header $oldrpm | sed -e "s,-$release1$,-@RELEASE@," > $file1
+    check_header $newrpm | sed -e "s,-$release2$,-@RELEASE@," > $file2
+
+    if ! diff -au $file1 $file2; then
+      rm $file1 $file2
+      return 1
     fi
     
     # First check the file attributes and later the md5s

++++++ same-build-result.sh ++++++
--- /var/tmp/diff_new_pack.EZ8eij/_old  2012-02-22 15:52:53.000000000 +0100
+++ /var/tmp/diff_new_pack.EZ8eij/_new  2012-02-22 15:52:53.000000000 +0100
@@ -63,8 +63,9 @@
 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 '
@@ -111,19 +112,22 @@
   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
+appdatas=`cd $OTHERDIR && find . -name *-appdata.xml`
+for xml in $appdatas; do
+  # compare appstream data
+  if test -e $OLDDIR/$xml -a -e $OTHERDIR/$xml; then
+    file1=$OLDDIR/$xml
+    file2=$OTHERDIR/$xml
+    if ! cmp -s $file1 $file2; then
+      echo "$xml files differ:"
+      diff -u0 $file1 $file2 |head -n 20
+      SUCCESS=0
+    fi
+  elif test -e $OTHERDIR/$xml; then
+    echo "$xml is new"
     SUCCESS=0
   fi
-elif test -e $OTHERDIR/appdata.xml; then
-  echo "appdata.xml is new"
-  SUCCESS=0
-fi
+done
 
 if test $SUCCESS -eq 0; then
   exit 1

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to