[Git][reproducible-builds/strip-nondeterminism][master] 3 commits: Also normalise PO-Revision-Date in addition to POT-Creation-Date. (Closes: #981895)

Chris Lamb gitlab at salsa.debian.org
Fri Feb 5 12:05:05 UTC 2021



Chris Lamb pushed to branch master at Reproducible Builds / strip-nondeterminism


Commits:
06c8e7ed by Helmut Grohne at 2021-02-05T09:58:05+00:00
Also normalise PO-Revision-Date in addition to POT-Creation-Date. (Closes: #981895)

Signed-off-by: Chris Lamb <lamby at debian.org>

- - - - -
f3bb24de by Chris Lamb at 2021-02-05T12:02:07+00:00
Release version 1.11.0

Gbp-Dch: ignore

- - - - -
ed1cc178 by Chris Lamb at 2021-02-05T12:04:11+00:00
Update changelog for 1.11.0-1 release

- - - - -


3 changed files:

- debian/changelog
- lib/File/StripNondeterminism.pm
- lib/File/StripNondeterminism/handlers/gettext.pm


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+strip-nondeterminism (1.11.0-1) unstable; urgency=medium
+
+  [ Helmut Grohne ]
+  * Also normalise PO-Revision-Date in addition to POT-Creation-Date.
+    (Closes: #981895)
+
+ -- Chris Lamb <lamby at debian.org>  Fri, 05 Feb 2021 12:04:06 +0000
+
 strip-nondeterminism (1.10.0-1) unstable; urgency=medium
 
   [ Chris Lamb ]


=====================================
lib/File/StripNondeterminism.pm
=====================================
@@ -26,7 +26,7 @@ use POSIX qw(tzset);
 
 our($VERSION, $canonical_time, $clamp_time, $verbose);
 
-$VERSION = '1.10.0'; # <https://semver.org/>
+$VERSION = '1.11.0'; # <https://semver.org/>
 
 sub init() {
 	$ENV{'TZ'} = 'UTC';


=====================================
lib/File/StripNondeterminism/handlers/gettext.pm
=====================================
@@ -82,17 +82,18 @@ sub normalize {
 		my $trans_len = unpack($fmt, substr($buf, $trans_to + $i*8));
 		my $trans_offset = unpack($fmt, substr($buf, $trans_to + $i*8 + 4));
 		my $trans_msg = substr($buf, $trans_offset, $trans_len);
-		next unless $trans_msg =~ m/^POT-Creation-Date: (.*)/m;
+		next unless $trans_msg =~ m/^(POT-Creation-Date|PO-Revision-Date): (.*)/m;
 
-		my $pot_date = $1;
+		my $date_key = $1;
+		my $date_value = $2;
 		my $time;
-		eval {$time = Time::Piece->strptime($pot_date, "%Y-%m-%d %H:%M%z");};
+		eval {$time = Time::Piece->strptime($date_value, "%Y-%m-%d %H:%M%z");};
 		next if $@;
 		next if $time <= $norm_time;
 
 		my $new_time = strftime("%Y-%m-%d %H:%M%z", gmtime($norm_time));
 		$trans_msg
-		  =~ s/\QPOT-Creation-Date: $pot_date\E/POT-Creation-Date: $new_time/;
+		  =~ s/\Q$date_key: $date_value\E/$date_key: $new_time/;
 		next if length($trans_msg) != $trans_len;
 
 		$buf



View it on GitLab: https://salsa.debian.org/reproducible-builds/strip-nondeterminism/-/compare/5a9a41cb7089e2b59b398eb015217f8f177ba2f5...ed1cc178ef573c10d6b369d2347b80f62ecedd0b

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/strip-nondeterminism/-/compare/5a9a41cb7089e2b59b398eb015217f8f177ba2f5...ed1cc178ef573c10d6b369d2347b80f62ecedd0b
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20210205/36aaa096/attachment.htm>


More information about the rb-commits mailing list