Forráskód Böngészése

dpkg-genchanges: Only print build type once

If -B or -A are specified multiple times, there will be multiple
confusing messages stating what will supposedly be including, one
for each option appearence. Just merge the messages with the other
build type description. While at it, reword the binary-only upload
message to be consistent with the new merged ones.
Guillem Jover 12 éve
szülő
commit
acc2f23ea5
2 módosított fájl, 10 hozzáadás és 3 törlés
  1. 3 0
      debian/changelog
  2. 7 3
      scripts/dpkg-genchanges.pl

+ 3 - 0
debian/changelog

@@ -90,6 +90,9 @@ dpkg (1.17.11) UNRELEASED; urgency=low
   * Ignore DEB_CHECK_COMMAND in dpkg-buildpackage if the command is not found.
   * Emit a warning when using the deprecated -is/-ip/-isp/-ips options in
     dpkg-gencontrol.
+  * Only print build type once in dpkg-genchanges, instead of once for each
+    specified -A or -B option and then yet another time for the general build
+    type description.
 
   [ Updated programs translations ]
   * Danish (Joe Dalton). Closes: #754127

+ 7 - 3
scripts/dpkg-genchanges.pl

@@ -153,12 +153,10 @@ while (@ARGV) {
 	usageerr(_g('cannot combine %s and %s'), build_opt(), $_)
 	    if is_sourceonly;
 	$include = BUILD_ARCH_DEP;
-	printf { *STDERR } _g('%s: arch-specific upload - not including arch-independent packages') . "\n", $Dpkg::PROGNAME;
     } elsif (m/^-A$/) {
 	usageerr(_g('cannot combine %s and %s'), build_opt(), $_)
 	    if is_sourceonly;
 	$include = BUILD_ARCH_INDEP;
-	printf { *STDERR } _g('%s: arch-indep upload - not including arch-specific packages') . "\n", $Dpkg::PROGNAME;
     } elsif (m/^-S$/) {
 	usageerr(_g('cannot combine %s and %s'), build_opt(), $_)
 	    if is_binaryonly;
@@ -436,8 +434,14 @@ if (!is_binaryonly) {
     for my $f ($checksums->get_files()) {
         $dist->add_file($f, $sec, $pri);
     }
+} elsif ($include == BUILD_ARCH_DEP) {
+    $origsrcmsg = _g('binary-only arch-specific upload ' .
+                     '(source code and arch-indep packages not included)');
+} elsif ($include == BUILD_ARCH_INDEP) {
+    $origsrcmsg = _g('binary-only arch-indep upload ' .
+                     '(source code and arch-specific packages not included)');
 } else {
-    $origsrcmsg= _g('binary-only upload - not including any source code');
+    $origsrcmsg = _g('binary-only upload (no source code included)');
 }
 
 print { *STDERR } "$Dpkg::PROGNAME: $origsrcmsg\n"