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

scripts: Use error() and errormsg() instead of printing on STDERR directly

This way any transformation done for error messages gets applied
consistently to all error output.
Guillem Jover 11 éve
szülő
commit
d287060bb1
2 módosított fájl, 5 hozzáadás és 6 törlés
  1. 1 2
      scripts/Dpkg/Source/Package/V1.pm
  2. 4 4
      scripts/dpkg-checkbuilddeps.pl

+ 1 - 2
scripts/Dpkg/Source/Package/V1.pm

@@ -403,8 +403,7 @@ sub do_build {
     }
 
     if ($ur) {
-        printf { *STDERR } g_('%s: unrepresentable changes to source') . "\n",
-               $Dpkg::PROGNAME;
+        errormsg(g_('unrepresentable changes to source'));
         exit(1);
     }
 }

+ 4 - 4
scripts/dpkg-checkbuilddeps.pl

@@ -138,12 +138,12 @@ if ($bc_value) {
 }
 
 if (@unmet) {
-	printf { *STDERR } g_('%s: Unmet build dependencies: '), $Dpkg::PROGNAME;
-	print { *STDERR } join(' ', map { $_->output() } @unmet), "\n";
+	error(g_('Unmet build dependencies: %s'),
+	      join(' ', map { $_->output() } @unmet));
 }
 if (@conflicts) {
-	printf { *STDERR } g_('%s: Build conflicts: '), $Dpkg::PROGNAME;
-	print { *STDERR } join(' ', map { $_->output() } @conflicts), "\n";
+	error(g_('Build conflicts: %s'),
+	      join(' ', map { $_->output() } @conflicts));
 }
 exit 1 if @unmet || @conflicts;