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

dpkg-buildpackage: When using -A use 'all' as arch for the .changes filename

When building only arch-indep binaries, name the .changes file using
‘all’ as architecture.

Closes: #661638
Guillem Jover лет назад: 14
Родитель
Сommit
cd6389211b
2 измененных файлов с 9 добавлено и 3 удалено
  1. 2 0
      debian/changelog
  2. 7 3
      scripts/dpkg-buildpackage.pl

+ 2 - 0
debian/changelog

@@ -58,6 +58,8 @@ dpkg (1.16.2) UNRELEASED; urgency=low
   * Improve and clarify dpkg-shlibdeps superfluous linking warning messages.
     Based on a patch by Peter Eisentraut <petere@debian.org>. Closes: #656496
   * Relax --merge-avail Packages file parser, to not fail on bogus versions.
+  * When building only arch-indep binaries with «dpkg-buildpackage -A», name
+    the .changes file using ‘all’ as architecture. Closes: #661638
 
   [ Raphaël Hertzog ]
   * Update Dpkg::Shlibs to look into multiarch paths when cross-building

+ 7 - 3
scripts/dpkg-buildpackage.pl

@@ -4,6 +4,7 @@
 #
 # Copyright © 1996 Ian Jackson
 # Copyright © 2000 Wichert Akkerman
+# Copyright © 2006-2010,2012 Guillem Jover <guillem@debian.org>
 # Copyright © 2007 Frank Lichtenheld
 #
 # This program is free software; you can redistribute it and/or modify
@@ -135,6 +136,7 @@ my $include = BUILD_ALL | BUILD_DEFAULT;
 sub build_normal() { return ($include & BUILD_ALL) == BUILD_ALL; }
 sub build_sourceonly() { return $include == BUILD_SOURCE; }
 sub build_binaryonly() { return !($include & BUILD_SOURCE); }
+sub build_binaryindep() { return ($include == BUILD_ARCH_INDEP); }
 sub build_opt() {
     return (($include == BUILD_BINARY) ? '-b' :
             (($include == BUILD_ARCH_DEP) ? '-B' :
@@ -330,10 +332,12 @@ while ($_ = <$arch_env>) {
 close $arch_env or subprocerr('dpkg-architecture');
 
 my $arch;
-unless (build_sourceonly) {
-    $arch = mustsetvar($ENV{'DEB_HOST_ARCH'}, _g('host architecture'));
-} else {
+if (build_sourceonly) {
     $arch = 'source';
+} elsif (build_binaryindep) {
+    $arch = 'all';
+} else {
+    $arch = mustsetvar($ENV{'DEB_HOST_ARCH'}, _g('host architecture'));
 }
 
 # Preparation of environment stops here