- Whitespace in javadoc case
- Whitespace changes in html case - Move case kde/gtk html up in the case list - Move case rdoc html up in the case list - Add option -a to same-build-result.sh and loop through all rpms - Rework sorting of rpm files in same-build-result.sh - Better diagnostic if number of subpackages changes - Create tmpfiles earlier in same-build-result.sh - Handle all javadoc html files OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=201
This commit is contained in:
parent
6320d4fe21
commit
9abd4b5365
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 7 11:56:28 UTC 2016 - olaf@aepfle.de
|
||||
|
||||
- Whitespace in javadoc case
|
||||
- Whitespace changes in html case
|
||||
- Move case kde/gtk html up in the case list
|
||||
- Move case rdoc html up in the case list
|
||||
- Add option -a to same-build-result.sh and loop through all rpms
|
||||
- Rework sorting of rpm files in same-build-result.sh
|
||||
- Better diagnostic if number of subpackages changes
|
||||
- Create tmpfiles earlier in same-build-result.sh
|
||||
- Handle all javadoc html files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 4 18:50:32 UTC 2016 - olaf@aepfle.de
|
||||
|
||||
|
@ -21,7 +21,7 @@ Summary: Build Result Compare Script
|
||||
License: GPL-2.0+
|
||||
Group: Development/Tools/Building
|
||||
Url: https://github.com/openSUSE/build-compare
|
||||
Version: 20160304T195219.e59af35
|
||||
Version: 20160307T125659.618d059
|
||||
Release: 0
|
||||
Source1: COPYING
|
||||
Source2: same-build-result.sh
|
||||
|
29
pkg-diff.sh
29
pkg-diff.sh
@ -499,6 +499,19 @@ check_single_file()
|
||||
sed -i -e "s,POT-Creation-Date: ....-..-.. ..:..+....,POT-Creation-Date: 1970-01-01 00:00+0000," $f
|
||||
done
|
||||
;;
|
||||
*/rdoc/files/*.html)
|
||||
# ruby documentation
|
||||
# <td>Mon Sep 20 19:02:43 +0000 2010</td>
|
||||
for f in old/$file new/$file; do
|
||||
sed -i -e 's%<td>[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]\+ [0-9]\+:[0-9]\+:[0-9]\+ +0000 201[0-9]</td>%<td>Mon Sep 20 19:02:43 +0000 2010</td>%g' $f
|
||||
done
|
||||
strip_numbered_anchors
|
||||
;;
|
||||
/usr/share/doc/kde/HTML/*/*/index.cache|/usr/share/doc/kde/HTML/*/*/*/index.cache|\
|
||||
/usr/share/gtk-doc/html/*/*.html|/usr/share/gtk-doc/html/*/*.devhelp2)
|
||||
# various kde and gtk packages
|
||||
strip_numbered_anchors
|
||||
;;
|
||||
/usr/share/doc/packages/*/*.html|\
|
||||
/usr/share/doc/packages/*/*/*.html|\
|
||||
/usr/share/doc/*/html/*.html|\
|
||||
@ -518,8 +531,7 @@ check_single_file()
|
||||
done
|
||||
strip_numbered_anchors
|
||||
;;
|
||||
/usr/share/javadoc/*.html |\
|
||||
/usr/share/javadoc/*/*.html|/usr/share/javadoc/*/*/*.html)
|
||||
/usr/*/javadoc/*.html)
|
||||
strip_numbered_anchors
|
||||
# There are more timestamps in html, so far we handle only some primitive versions.
|
||||
for f in old/$file new/$file; do
|
||||
@ -624,25 +636,12 @@ check_single_file()
|
||||
sed -i -e 's|built by abuild@[a-z0-9]* on ... ... [0-9]* [0-9]*:[0-9][0-9]:[0-9][0-9] .* 20[0-9][0-9]|built by abuild@build42 on Thu May 6 11:21:17 UTC 2010|' $f
|
||||
done
|
||||
;;
|
||||
/usr/share/doc/kde/HTML/*/*/index.cache|/usr/share/doc/kde/HTML/*/*/*/index.cache|\
|
||||
/usr/share/gtk-doc/html/*/*.html|/usr/share/gtk-doc/html/*/*.devhelp2)
|
||||
# various kde and gtk packages
|
||||
strip_numbered_anchors
|
||||
;;
|
||||
*/created.rid)
|
||||
# ruby documentation
|
||||
# file just contains a timestamp and nothing else, so ignore it
|
||||
echo "Ignore $file"
|
||||
return 0
|
||||
;;
|
||||
*/rdoc/files/*.html)
|
||||
# ruby documentation
|
||||
# <td>Mon Sep 20 19:02:43 +0000 2010</td>
|
||||
for f in old/$file new/$file; do
|
||||
sed -i -e 's%<td>[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]\+ [0-9]\+:[0-9]\+:[0-9]\+ +0000 201[0-9]</td>%<td>Mon Sep 20 19:02:43 +0000 2010</td>%g' $f
|
||||
done
|
||||
strip_numbered_anchors
|
||||
;;
|
||||
*/Linux*Env.Set.sh)
|
||||
# LibreOffice files, contains:
|
||||
# Generated on: Mon Apr 18 13:19:22 UTC 2011
|
||||
|
@ -14,7 +14,19 @@
|
||||
CMPSCRIPT=${0%/*}/pkg-diff.sh
|
||||
SCMPSCRIPT=${0%/*}/srpm-check.sh
|
||||
|
||||
check_all=1
|
||||
file1=`mktemp`
|
||||
file2=`mktemp`
|
||||
_x() {
|
||||
rm -f ${file1} ${file2}
|
||||
}
|
||||
trap _x EXIT
|
||||
#
|
||||
if test "$1" = "-a"
|
||||
then
|
||||
check_all="-a"
|
||||
shift
|
||||
fi
|
||||
#
|
||||
OLDDIR="$1"
|
||||
shift
|
||||
NEWDIRS="$*"
|
||||
@ -32,7 +44,9 @@ fi
|
||||
|
||||
if test `find $NEWDIRS -name '*.rpm' -and ! -name '*.delta.rpm' | wc -l` != `find $OLDDIR -name '*.rpm' -and ! -name '*.delta.rpm' | wc -l`; then
|
||||
echo "different number of subpackages"
|
||||
find $OLDDIR $NEWDIRS -name '*.rpm' -and ! -name '*.delta.rpm'
|
||||
find $OLDDIR -name '*.rpm' -and ! -name '*.delta.rpm' -print0 | xargs -0 rpm -qp --qf '%{NAME}\n' | sort > ${file1}
|
||||
find $NEWDIRS -name '*.rpm' -and ! -name '*.delta.rpm' -print0 | xargs -0 rpm -qp --qf '%{NAME}\n' | sort > ${file2}
|
||||
diff -u ${file1} ${file2}
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -59,8 +73,22 @@ bash $SCMPSCRIPT "$osrpm" "$nsrpm" || exit 1
|
||||
# problem: a package can contain both noarch and arch subpackages, so we have to
|
||||
# take care of proper sorting of NEWRPMS, e.g. noarch/x.rpm and x86_64/w.rpm since OLDRPMS
|
||||
# has all the packages in a single directory and would sort this as w.rpm, x.rpm.
|
||||
OLDRPMS=($(find "$OLDDIR" -type f -name \*rpm -a ! -name \*src.rpm -a ! -name \*.delta.rpm|sort|grep -v -- -32bit-|grep -v -- -64bit-|grep -v -- '-x86-.*\.ia64\.rpm'))
|
||||
NEWRPMS=($(find $NEWDIRS -type f -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'))
|
||||
find "$OLDDIR" -type f -name '*.rpm' \
|
||||
-a ! -name '*src.rpm' \
|
||||
-a ! -name '*.delta.rpm' \
|
||||
-a ! -name '*-32bit-*' \
|
||||
-a ! -name '*-64bit-*' \
|
||||
-a ! -name '*-x86-*.ia64.rpm' \
|
||||
> ${file1}
|
||||
find "$NEWDIRS" -type f -name '*.rpm' \
|
||||
-a ! -name '*src.rpm' \
|
||||
-a ! -name '*.delta.rpm' \
|
||||
-a ! -name '*-32bit-*' \
|
||||
-a ! -name '*-64bit-*' \
|
||||
-a ! -name '*-x86-*.ia64.rpm' \
|
||||
> ${file2}
|
||||
OLDRPMS=($( sort --field-separator=/ --key=` sed -n '1s@[^/]@@gp' ${file1} | wc -c ` ${file1} ))
|
||||
NEWRPMS=($( sort --field-separator=/ --key=` sed -n '1s@[^/]@@gp' ${file2} | wc -c ` ${file2} ))
|
||||
|
||||
# Get version-release from first RPM and keep for rpmlint check
|
||||
# Remember to quote the "." for future regexes
|
||||
@ -84,11 +112,7 @@ for opac in ${OLDRPMS[*]}; do
|
||||
echo "skipping -debuginfo package"
|
||||
;;
|
||||
*)
|
||||
bash $CMPSCRIPT "$opac" "$npac" || SUCCESS=0
|
||||
if test $SUCCESS -eq 0 -a -z "$check_all"; then
|
||||
echo "differences between $opac and $npac"
|
||||
exit 1
|
||||
fi
|
||||
bash $CMPSCRIPT "$check_all" "$opac" "$npac" || SUCCESS=0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@ -110,8 +134,6 @@ fi
|
||||
|
||||
if test -n "$OTHERDIR"; then
|
||||
if test -e $OLDDIR/rpmlint.log -a -e $OTHERDIR/rpmlint.log; then
|
||||
file1=`mktemp`
|
||||
file2=`mktemp`
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user