Bug#790397: libparse-recdescent-perl: please make the output reproducible
Florian Schlichting
fsfs at debian.org
Fri Jul 3 22:57:37 UTC 2015
Hi Chris,
On Sun, Jun 28, 2015 at 11:09:49PM +0100, Chris Lamb wrote:
> Source: libparse-recdescent-perl
> Version: 1.967009+dfsg-2
> While working on the "reproducible builds" effort [1], we have noticed
> that libparse-recdescent-perl generates non-reproducible output.
>
> The attached patch removes this randomness. Once applied, (some)
> packages that use libparse-recdescent-perl can be built in our
> reproducible toolchain (for example, libmodule-extractuse-perl).
the attached patch was already applied as part of the -2 upload, fixing
#778575 and making libparse-recdescent-perl itself reproducible.
Did you mean to send a different patch?
> diff --git a/lib/Parse/RecDescent.pm b/lib/Parse/RecDescent.pm
> index 28149d7..2d22e71 100644
> --- a/lib/Parse/RecDescent.pm
> +++ b/lib/Parse/RecDescent.pm
> @@ -144,6 +144,7 @@ sub Precompile
> print OUT "my ";
>
> require Data::Dumper;
> + $Data::Dumper::Sortkeys = 1;
> $code = Data::Dumper->Dump([$self], [qw(self)]);
> if ($opt{-standalone}) {
> $code =~ s/Parse::RecDescent/$runtime_package/gs;
> @@ -3082,7 +3083,7 @@ local \$SIG{__WARN__} = sub {0};
> $self->{"startcode"} = '';
>
> my $rule;
> - foreach $rule ( values %{$self->{"rules"}} )
> + foreach $rule ( sort {$a->{'name'} cmp $b->{'name'}} values %{$self->{"rules"}} )
> {
> if ($rule->{"changed"})
> {
Florian
More information about the pkg-perl-maintainers
mailing list