Control: clone -1 -2 Control: retitle -2 handle gettext PO-Revision-Date Control: reassign -2 libstrip-nondeterminism-perl Control: block -1 by -2
On Thu, Feb 04, 2021 at 06:51:49PM +0000, Simon McVittie wrote: > 0.182+20210203-1.1 doesn't seem to solve this as intended, and triggers > a similar failure mode on a more frequently co-installed pair of > architectures: > > $ apt-get download libelf1 libelf1:i386 > $ aunpack libelf1_0.182+20210203-1.1_amd64.deb > $ aunpack libelf1_0.182+20210203-1.1_i386.deb > $ diff -ru libelf1_0.182+20210203-1.1_*/usr/share/ > Binary files > libelf1_0.182+20210203-1.1_amd64/usr/share/locale/en@boldquot/LC_MESSAGES/elfutils.mo > and > libelf1_0.182+20210203-1.1_i386/usr/share/locale/en@boldquot/LC_MESSAGES/elfutils.mo > differ > Binary files > libelf1_0.182+20210203-1.1_amd64/usr/share/locale/en@quot/LC_MESSAGES/elfutils.mo > and > libelf1_0.182+20210203-1.1_i386/usr/share/locale/en@quot/LC_MESSAGES/elfutils.mo > differ Thank you. After a little longer irc discussion, we mostly concluded that this should be stripped by dh_strip_nondeterminism for now. It already fixes the POT-Creation-Date, but does not touch the PO-Revision-Date, because this field usually is only changed by translators. Unfortunately, there are also some "mechanical" translators in the form of sed scripts copied from gettext using autotools. Those translators are used to create the en@quot and en@boldquot locales. Given that they are translated at build time, they PO-Revision-Date is "now" and if they are not corrected, then we see what we see here. I'm attaching a patch to dh-strip-nondeterminism. Can $someone upload it real soon as the libelf1 breakage has a high impact here? Once uploaded, we'll have to binNMU elfutils. Helmut
--- strip-nondeterminism-1.10.0.orig/lib/File/StripNondeterminism/handlers/gettext.pm +++ strip-nondeterminism-1.10.0/lib/File/StripNondeterminism/handlers/gettext.pm @@ -82,17 +82,18 @@ 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