From c5a2d0121bc4ce05960cc8f83ec1774fb2dbc5d0 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Tue, 4 Dec 2007 20:43:29 +0100 Subject: [PATCH] Dpkg::ErrorHandling::usageerr: Support format strings When changing all error reporting function to support format strings, usageerr was apparently forgotten. --- ChangeLog | 4 ++++ scripts/Dpkg/ErrorHandling.pm | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 16c8bcc7..430503aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-12-04 Frank Lichtenheld + * scripts/Dpkg/ErrorHandling.pm (usageerr): + Support format strings like all the other + error reporting functions. + * scripts/Makefile.am (EXTRA_DIST): Add missing files from scripts/t/. diff --git a/scripts/Dpkg/ErrorHandling.pm b/scripts/Dpkg/ErrorHandling.pm index 8297859f..53bd45df 100644 --- a/scripts/Dpkg/ErrorHandling.pm +++ b/scripts/Dpkg/ErrorHandling.pm @@ -80,7 +80,10 @@ sub subprocerr(@) sub usageerr(@) { - printf(STDERR "%s: %s\n\n", $progname, "@_"); + my ($msg) = (shift); + + $msg = sprintf($msg, @_) if (@_); + warn "$progname: $msg\n\n"; # XXX: access to main namespace main::usage(); exit(2); -- 2.39.5