[dpkg] 136/200: dpkg-genchanges: Do not compute the architecture list twice

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:17:29 UTC 2017


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

infinity0 pushed a commit to branch master
in repository dpkg.

commit 5bddd2d7b9944ab2eacb1860ba625b69b0b4411c
Author: Guillem Jover <guillem at debian.org>
Date:   Fri Dec 23 00:21:24 2016 +0100

    dpkg-genchanges: Do not compute the architecture list twice
    
    Just generate the list correctly when doing the initial filtering
    instead of having to do a useless two-pass.
---
 debian/changelog           | 1 +
 scripts/dpkg-genchanges.pl | 8 ++------
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 06c2960..ba9fae5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -30,6 +30,7 @@ dpkg (1.18.19) UNRELEASED; urgency=medium
     file in dpkg-genchanges into the initial loop. This way we do not include
     architectures for artifacts we are not going to distribute, and do not
     unnecessarily recompute the checksums for artifacts like the sources.
+  * Do not compute the architecture list twice in dpkg-genchanges.
   * Portability:
     - On GNU/Hurd try to use the new process executable name attribute from
       libps, to properly match on start-stop-daemon --exec.
diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl
index ec6e3ef..7eb6283 100755
--- a/scripts/dpkg-genchanges.pl
+++ b/scripts/dpkg-genchanges.pl
@@ -287,6 +287,8 @@ if (build_has_any(BUILD_SOURCE)) {
         $origsrcmsg = g_('including full source code in upload');
     }
 
+    push @archvalues, 'source';
+
     # Only add attributes for files being distributed.
     for my $f ($checksums->get_files()) {
         $dist->add_file($f, $sec, $pri);
@@ -456,12 +458,6 @@ if (length($fields->{'Binary'}) > 980) {
     $fields->{'Binary'} =~ s/(.{0,980}) /$1\n/g;
 }
 
-unshift @archvalues, 'source' if build_has_any(BUILD_SOURCE);
- at archvalues = ('all') if build_is(BUILD_ARCH_INDEP);
- at archvalues = grep { !debarch_eq('all', $_) } @archvalues
-    if build_has_none(BUILD_ARCH_INDEP);
- at archvalues = grep { !debarch_eq($host_arch, $_) } @archvalues
-    if build_has_none(BUILD_ARCH_DEP);
 $fields->{'Architecture'} = join ' ', @archvalues;
 
 $fields->{'Built-For-Profiles'} = join ' ', get_build_profiles();

-- 
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