forked from pool/build-compare
Accepting request 293474 from openSUSE:Tools
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/293474 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/build-compare?expand=0&rev=87
This commit is contained in:
commit
4583b1521f
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 20 18:58:22 UTC 2015 - olaf@aepfle.de
|
||||
|
||||
- 2015.03.20
|
||||
- Convert correct png file before comparison
|
||||
- Avoid name clashes when comparing png files
|
||||
- Handle filename changes gracefully when comparing unknown filetypes
|
||||
- Use generic helper to compare png files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 12 10:41:45 UTC 2015 - 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: 2015.02.10
|
||||
Version: 2015.03.20
|
||||
Release: 0
|
||||
Source1: COPYING
|
||||
Source2: same-build-result.sh
|
||||
|
@ -255,4 +255,4 @@ function cmp_spec ()
|
||||
rm $file1 $file2
|
||||
return $RES
|
||||
}
|
||||
# vim: tw=666 ts=2 et
|
||||
# vim: tw=666 ts=2 shiftwidth=2 et
|
||||
|
48
pkg-diff.sh
48
pkg-diff.sh
@ -154,14 +154,24 @@ dfile=`mktemp`
|
||||
|
||||
diff_two_files()
|
||||
{
|
||||
if ! cmp -s old/$file new/$file; then
|
||||
echo "$file differs ($ftype)"
|
||||
hexdump -C old/$file > $file1
|
||||
hexdump -C new/$file > $file2
|
||||
diff -u $file1 $file2 | head -n 200
|
||||
return 1
|
||||
if test ! -e old/$file; then
|
||||
echo "Missing in old package: $file"
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
if test ! -e new/$file; then
|
||||
echo "Missing in new package: $file"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if cmp -s old/$file new/$file; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "$file differs ($ftype)"
|
||||
hexdump -C old/$file > $file1
|
||||
hexdump -C new/$file > $file2
|
||||
diff -u $file1 $file2 | head -n 200
|
||||
return 1
|
||||
}
|
||||
|
||||
trim_man_first_line()
|
||||
@ -411,19 +421,17 @@ check_single_file()
|
||||
return $?
|
||||
;;
|
||||
*png)
|
||||
# Try to remove timestamps, only if convert from ImageMagick is installed
|
||||
# Try to remove timestamps, only if convert from ImageMagick is installed
|
||||
if [[ $(type -p convert) ]]; then
|
||||
convert old/$file +set date:create +set date:modify old/${file/.png/_n.png}
|
||||
convert old/$file +set date:create +set date:modify new/${file/.png/_n.png}
|
||||
if ! cmp -s old/${file/.png/_n.png} new/${file/.png/_n.png}; then
|
||||
echo "$file differs ($ftype)"
|
||||
hexdump -C old/${file/.png/_n.png} > $file1
|
||||
hexdump -C new/${file/.png/_n.png} > $file2
|
||||
diff -u $file1 $file2 | head -n 20
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
convert old/$file +set date:create +set date:modify old/${file}.$PPID.$$
|
||||
convert new/$file +set date:create +set date:modify new/${file}.$PPID.$$
|
||||
mv -f old/${file}.$PPID.$$ old/${file}
|
||||
mv -f new/${file}.$PPID.$$ new/${file}
|
||||
if ! diff_two_files; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
;;
|
||||
/usr/share/locale/*/LC_MESSAGES/*.mo|/usr/share/locale-bundle/*/LC_MESSAGES/*.mo)
|
||||
for f in old/$file new/$file; do
|
||||
@ -762,4 +770,4 @@ if test "$ret" = 0; then
|
||||
echo "Package content is identical"
|
||||
fi
|
||||
exit $ret
|
||||
# vim: tw=666 ts=2 et
|
||||
# vim: tw=666 ts=2 shiftwidth=2 et
|
||||
|
@ -141,4 +141,4 @@ if test $SUCCESS -eq 0; then
|
||||
fi
|
||||
echo 'compare validated built as identical !'
|
||||
exit 0
|
||||
# vim: tw=666 ts=2 et
|
||||
# vim: tw=666 ts=2 shiftwidth=2 et
|
||||
|
@ -97,4 +97,4 @@ done
|
||||
|
||||
rm -rf $dir
|
||||
exit $ret
|
||||
# vim: tw=666 ts=2 et
|
||||
# vim: tw=666 ts=2 shiftwidth=2 et
|
||||
|
Loading…
Reference in New Issue
Block a user