summaryrefslogtreecommitdiff
path: root/Debian
diff options
context:
space:
mode:
Diffstat (limited to 'Debian')
-rw-r--r--Debian/Dgit.pm22
1 files changed, 11 insertions, 11 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm
index 2e9fa64..8260e9f 100644
--- a/Debian/Dgit.pm
+++ b/Debian/Dgit.pm
@@ -198,7 +198,7 @@ sub messagequote ($) {
sub shellquote {
my @out;
local $_;
- defined or confess 'internal error' foreach @_;
+ defined or confess __ 'internal error' foreach @_;
foreach my $a (@_) {
$_ = $a;
if (!length || m{[^-=_./:0-9a-z]}i) {
@@ -292,7 +292,7 @@ sub _us () {
}
sub failmsg {
- my $s = "error: @_\n";
+ my $s = f_ "error: %s\n", "@_";
$s =~ s/\n\n$/\n/g;
my $prefix = _us().": ";
$s =~ s/^/$prefix/gm;
@@ -312,7 +312,7 @@ sub ensuredir ($) {
sub must_getcwd () {
my $d = getcwd();
- defined $d or fail "getcwd failed: $!\n";
+ defined $d or fail f_ "getcwd failed: %s\n", $!;
return $d;
}
@@ -331,32 +331,32 @@ our @signames = split / /, $Config{sig_name};
sub waitstatusmsg () {
if (!$?) {
- return "terminated, reporting successful completion";
+ return __ "terminated, reporting successful completion";
} elsif (!($? & 255)) {
- return "failed with error exit status ".WEXITSTATUS($?);
+ return f_ "failed with error exit status %s", WEXITSTATUS($?);
} elsif (WIFSIGNALED($?)) {
my $signum=WTERMSIG($?);
- return "died due to fatal signal ".
+ return f_ "died due to fatal signal %s",
($signames[$signum] // "number $signum").
($? & 128 ? " (core dumped)" : ""); # POSIX(3pm) has no WCOREDUMP
} else {
- return "failed with unknown wait status ".$?;
+ return f_ "failed with unknown wait status %s", $?;
}
}
sub failedcmd_report_cmd {
my $intro = shift @_;
- $intro //= "failed command";
+ $intro //= __ "failed command";
{ local ($!); printcmd \*STDERR, _us().": $intro:", @_ or die $!; };
}
sub failedcmd_waitstatus {
if ($? < 0) {
- return "failed to fork/exec: $!";
+ return f_ "failed to fork/exec: %s", $!;
} elsif ($?) {
- return "subprocess ".waitstatusmsg();
+ return f_ "subprocess %s", waitstatusmsg();
} else {
- return "subprocess produced invalid output";
+ return __ "subprocess produced invalid output";
}
}