Pārlūkot izejas kodu

dpkg-genchanges: Correctly filter host arch from the Architecture field

We should also filter the host arch in the same way we filter the all
arch when the build type excludes these packages, otherwise we get
incongruent .changes files.
Guillem Jover 12 gadi atpakaļ
vecāks
revīzija
0a0d297053
2 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 4 0
      debian/changelog
  2. 2 0
      scripts/dpkg-genchanges.pl

+ 4 - 0
debian/changelog

@@ -96,6 +96,10 @@ dpkg (1.17.11) UNRELEASED; urgency=low
   * Unify build options description in --help output for dpkg-buildpackage
   * Unify build options description in --help output for dpkg-buildpackage
     and dpkg-genchanges.
     and dpkg-genchanges.
   * Only allow one build type option in dpkg-genchanges and dpkg-buildpackage.
   * Only allow one build type option in dpkg-genchanges and dpkg-buildpackage.
+  * Correctly filter the host architecture on the Architecture field in the
+    generated .changes file from dpkg-genchanges, when the debian/files
+    contains arch-specific packages but dpkg-genchanges was called with
+    one of the build types excluding them.
 
 
   [ Updated programs translations ]
   [ Updated programs translations ]
   * Danish (Joe Dalton). Closes: #754127
   * Danish (Joe Dalton). Closes: #754127

+ 2 - 0
scripts/dpkg-genchanges.pl

@@ -466,6 +466,8 @@ unshift @archvalues, 'source' unless is_binaryonly;
 @archvalues = ('all') if $include == BUILD_ARCH_INDEP;
 @archvalues = ('all') if $include == BUILD_ARCH_INDEP;
 @archvalues = grep { !debarch_eq('all', $_) } @archvalues
 @archvalues = grep { !debarch_eq('all', $_) } @archvalues
     unless $include & BUILD_ARCH_INDEP;
     unless $include & BUILD_ARCH_INDEP;
+@archvalues = grep { !debarch_eq($host_arch, $_) } @archvalues
+    unless $include & 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();