[dpkg] 88/192: Dpkg::Substvars: Make the warnings output deterministic

Ximin Luo infinity0 at debian.org
Tue Oct 17 11:04:04 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit b8639b63cbdb09569eb650d4605bfccc00aaf4ca
Author: Chris Lamb <lamby at debian.org>
Date:   Sat Aug 5 03:18:31 2017 +0200

    Dpkg::Substvars: Make the warnings output deterministic
    
    Closes: #870221
    Signed-off-by: Guillem Jover <guillem at debian.org>
---
 debian/changelog          | 2 ++
 scripts/Dpkg/Substvars.pm | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index b7dc496..da6e4e9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,8 @@ dpkg (1.19.0) UNRELEASED; urgency=medium
       set better default "get_key_func" options, which will become the default
       behavior in 1.20.x. Prompted by Johannes Schauer <josch at debian.org>.
     - Mark ppc64 as having gcc builtin PIE in Dpkg::Vendor::Debian.
+    - Make the Dpkg::Substvars warnings output deterministic.
+      Thanks to Chris Lamb <lamby at debian.org>. Closes: #870221
   * Documentation:
     - Document currently accepted syntax for changelogs in deb-changelog(5).
       Closes: #858579
diff --git a/scripts/Dpkg/Substvars.pm b/scripts/Dpkg/Substvars.pm
index 9d52f32..19d8516 100644
--- 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list