Hi!
On Mon, 2017-07-31 at 03:19:52 +0100, Chris Lamb wrote:
> Source: dpkg
> Version: 1.18.24
> Severity: wishlist
> Tags: patch
> User: [email protected]
> Usertags: hashordering toolchain
> X-Debbugs-Cc: [email protected]
> Whilst working on the Reproducible Builds effort [0], we noticed
> that dpkg emits "unused substitution" warnings in a non-deterministic
> Perl hash order.
>
> Correcting this would be helpful for the Reproducible Builds effort
> as it removes differences between in log between package builds.
>
> Whilst the build log is not part of the defined reproducible build
> output (!) we use the diff of two build logs as a useful debugging aid
> when working out why a package is not reproducible, and reducing any
> noise makes this easier.
>
> --- a/scripts/Dpkg/Substvars.pm
> +++ b/scripts/Dpkg/Substvars.pm
> @@ -342,7 +342,7 @@ sub warn_about_unused {
> my ($self, %opts) = @_;
> $opts{msg_prefix} //= $self->{msg_prefix};
>
> - foreach my $vn (keys %{$self->{vars}}) {
> + foreach my $vn (sort keys %{$self->{vars}}) {
> next if $self->{attr}{$vn} & SUBSTVAR_ATTR_USED;
> # Empty substitutions variables are ignored on the basis
> # that they are not required in the current situation
Thanks! I merged this locally few days ago. Will be part of my next
push and of dpkg 1.19.0.
Regards,
Guillem