From 28e7830dca604f150c68282c8164d8627ed7b785da2d9fe5e89cc8131dfc1e2a Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Thu, 3 Mar 2016 13:11:31 +0000 Subject: [PATCH] - Handle timestamp in dvi files - Handle Last-modified HTML META tag - Handle yet another variant of javadoc timestamps OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=199 --- build-compare.changes | 7 +++++++ build-compare.spec | 2 +- pkg-diff.sh | 29 +++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/build-compare.changes b/build-compare.changes index 9eca120..b26fc3f 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Mar 3 12:44:04 UTC 2016 - olaf@aepfle.de + +- Handle timestamp in dvi files +- Handle Last-modified HTML META tag +- Handle yet another variant of javadoc timestamps + ------------------------------------------------------------------- Fri Jan 1 10:11:14 UTC 2016 - schwab@suse.de diff --git a/build-compare.spec b/build-compare.spec index 916338e..2a9ad3d 100644 --- a/build-compare.spec +++ b/build-compare.spec @@ -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: 20160104T085658.0b929c8 +Version: 20160303T140910.a3e5233 Release: 0 Source1: COPYING Source2: same-build-result.sh diff --git a/pkg-diff.sh b/pkg-diff.sh index 8e51a9b..9c409df 100644 --- a/pkg-diff.sh +++ b/pkg-diff.sh @@ -440,6 +440,31 @@ check_single_file() perl -e "open fh, '+<', 'old/$file'; seek fh, 4, SEEK_SET; print fh '0000';" perl -e "open fh, '+<', 'new/$file'; seek fh, 4, SEEK_SET; print fh '0000';" ;; + *.dvi) + # Opcodes 247: pre; i[1], num[4], den[4], mag[4], k[1], x[k] + perl -e " + my \$rec; + open fh, '+<', 'old/$file'; + my \$dummy = read fh, \$rec, 15; + (\$pre, \$i, \$num, \$den, \$mag, \$k) = unpack('C2 N3 C', \$rec); + seek fh, 15, SEEK_SET; + while (\$k > 0) { + print fh '0'; + \$k--; + } + " + perl -e " + my \$rec; + open fh, '+<', 'new/$file'; + my \$dummy = read fh, \$rec, 15; + (\$pre, \$i, \$num, \$den, \$mag, \$k) = unpack('C2 N3 C', \$rec); + seek fh, 15, SEEK_SET; + while (\$k > 0) { + print fh '0'; + \$k--; + } + " + ;; *.bz2) bunzip2 -c old/$file > old/${file/.bz2/} bunzip2 -c new/$file > new/${file/.bz2/} @@ -480,6 +505,7 @@ check_single_file() /usr/share/doc/kde/HTML/*/*/*.html) for f in old/$file new/$file; do sed -i -e ' + s|META NAME="Last-modified" CONTENT="[^"]\+"|META NAME="Last-modified" CONTENT="Thu Mar 3 10:32:44 2016"| s||| s| # + # # # sed -i -e ' @@ -510,6 +537,8 @@ check_single_file() /^<\/head>/{ b end_head } + s/^// + t next s/^\(\)/\1 some-date-removed-by-build-compare \5/ t next s/^\(\)/\1 some-date-removed-by-build-compare \3/