Explorar el Código

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 hace 9 años
padre
commit
5bddd2d7b9
Se han modificado 2 ficheros con 3 adiciones y 6 borrados
  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
     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.

+ 2 - 6
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);
-@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->{'Built-For-Profiles'} = join ' ', get_build_profiles();