Browse Source

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.
Guillem Jover 9 years ago
parent
commit
5bddd2d7b9
2 changed files with 3 additions and 6 deletions
  1. 1 0
      debian/changelog
  2. 2 6
      scripts/dpkg-genchanges.pl

+ 1 - 0
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
     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
     architectures for artifacts we are not going to distribute, and do not
     unnecessarily recompute the checksums for artifacts like the sources.
     unnecessarily recompute the checksums for artifacts like the sources.
+  * Do not compute the architecture list twice in dpkg-genchanges.
   * Portability:
   * Portability:
     - On GNU/Hurd try to use the new process executable name attribute from
     - On GNU/Hurd try to use the new process executable name attribute from
       libps, to properly match on start-stop-daemon --exec.
       libps, to properly match on start-stop-daemon --exec.

+ 2 - 6
scripts/dpkg-genchanges.pl

@@ -287,6 +287,8 @@ if (build_has_any(BUILD_SOURCE)) {
         $origsrcmsg = g_('including full source code in upload');
         $origsrcmsg = g_('including full source code in upload');
     }
     }
 
 
+    push @archvalues, 'source';
+
     # Only add attributes for files being distributed.
     # Only add attributes for files being distributed.
     for my $f ($checksums->get_files()) {
     for my $f ($checksums->get_files()) {
         $dist->add_file($f, $sec, $pri);
         $dist->add_file($f, $sec, $pri);
@@ -456,12 +458,6 @@ if (length($fields->{'Binary'}) > 980) {
     $fields->{'Binary'} =~ s/(.{0,980}) /$1\n/g;
     $fields->{'Binary'} =~ s/(.{0,980}) /$1\n/g;
 }
 }
 
 
-unshift @archvalues, 'source' if build_has_any(BUILD_SOURCE);
-@archvalues = ('all') if build_is(BUILD_ARCH_INDEP);
-@archvalues = grep { !debarch_eq('all', $_) } @archvalues
-    if build_has_none(BUILD_ARCH_INDEP);
-@archvalues = grep { !debarch_eq($host_arch, $_) } @archvalues
-    if build_has_none(BUILD_ARCH_DEP);
 $fields->{'Architecture'} = join ' ', @archvalues;
 $fields->{'Architecture'} = join ' ', @archvalues;
 
 
 $fields->{'Built-For-Profiles'} = join ' ', get_build_profiles();
 $fields->{'Built-For-Profiles'} = join ' ', get_build_profiles();