Kaynağa Gözat

Add new quiet option to dpkg-source to supress warnings. Closes: #355065

Guillem Jover 20 yıl önce
ebeveyn
işleme
876d77529b
4 değiştirilmiş dosya ile 12 ekleme ve 1 silme
  1. 6 0
      ChangeLog
  2. 1 0
      debian/changelog
  3. 2 1
      scripts/controllib.pl.in
  4. 3 0
      scripts/dpkg-source.pl

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2006-03-05  Guillem Jover  <guillem@debian.org>
+
+	* 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  <guillem@debian.org>
 
 	* debian/control (Build-Depends): Do not depend on libselinux1-dev

+ 1 - 0
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

+ 2 - 1
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( @_ ); } }
 

+ 3 - 0
scripts/dpkg-source.pl

@@ -72,6 +72,7 @@ Build options:   -c<controlfile>     get control info from this file
                  -U<field>           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[<regexp>]        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 {