From 876d77529b9d974942d1ced3c83cc607369395dd Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sun, 5 Mar 2006 20:31:21 +0000 Subject: [PATCH] Add new quiet option to dpkg-source to supress warnings. Closes: #355065 --- ChangeLog | 6 ++++++ debian/changelog | 1 + scripts/controllib.pl.in | 3 ++- scripts/dpkg-source.pl | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7058648b..c69f91ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-03-05 Guillem Jover + + * scripts/controllib.pl.in (quiet_warnings): New variable. + (warn): Do not print if quiet_warnings. + * dpkg-source.pl (usageversion): Document new option `-q'. + 2006-03-05 Guillem Jover * debian/control (Build-Depends): Do not depend on libselinux1-dev diff --git a/debian/changelog b/debian/changelog index baad5ea0..052649aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,7 @@ dpkg (1.13.17~) UNRELEASED; urgency=low attributes and other embellishments. * Add dpkg-query(1) in the SEE ALSO section in dpkg(1). Closes: #354643 * Don't try to compile in SELinux support on GNU/kFreeBSD amd64. + * Add new quiet option to dpkg-source to supress warnings. Closes: #355065 [ Updated man pages translations ] * Polish (Robert Luberda). Closes: #353782 diff --git a/scripts/controllib.pl.in b/scripts/controllib.pl.in index eed73958..794cc34d 100755 --- a/scripts/controllib.pl.in +++ b/scripts/controllib.pl.in @@ -26,6 +26,7 @@ $substvar{'Space'}= " "; $substvar{'Tab'}= "\t"; $maxsubsts=50; $warnable_error= 1; +$quiet_warnings = 0; $progname= $0; $progname= $& if $progname =~ m,[^/]+$,; @@ -456,7 +457,7 @@ sub failure { die "$progname: failure: $_[0]\n"; } sub syserr { die "$progname: failure: $_[0]: $!\n"; } sub error { die "$progname: error: $_[0]\n"; } sub internerr { die "$progname: internal error: $_[0]\n"; } -sub warn { warn "$progname: warning: $_[0]\n"; } +sub warn { if (!$quiet_warnings) { warn "$progname: warning: $_[0]\n"; } } sub usageerr { print(STDERR "$progname: @_\n\n"); &usageversion; exit(2); } sub warnerror { if ($warnable_error) { &warn( @_ ); } else { &error( @_ ); } } diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index babe7902..35d547f8 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -72,6 +72,7 @@ Build options: -c get control info from this file -U remove a field -W Turn certain errors into warnings. -E When -W is enabled, -E disables it. + -q quiet operation, do not print warnings. -sa auto select orig source (-sA is default) -i[] filter out files to ignore diffs of. Defaults to: '$diff_ignore_default_regexp' @@ -137,6 +138,8 @@ while (@ARGV && $ARGV[0] =~ m/^-/) { $warnable_error= 1; } elsif (m/^-E$/) { $warnable_error= 0; + } elsif (m/^-q$/) { + $quiet_warnings = 1; } elsif (m/^--$/) { last; } else { -- 2.39.5