Просмотр исходного кода

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
Родитель
Сommit
0a0d297053
2 измененных файлов с 6 добавлено и 0 удалено
  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
     and dpkg-genchanges.
   * 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 ]
   * 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 = grep { !debarch_eq('all', $_) } @archvalues
     unless $include & BUILD_ARCH_INDEP;
+@archvalues = grep { !debarch_eq($host_arch, $_) } @archvalues
+    unless $include & BUILD_ARCH_DEP;
 $fields->{'Architecture'} = join ' ', @archvalues;
 
 $fields->{'Built-For-Profiles'} = join ' ', get_build_profiles();