[SCM] Debian Qt/KDE packaging tools branch, master, updated. debian/0.6.4

Modestas Vainius modax at alioth.debian.org
Tue Feb 16 00:57:00 UTC 2010


The following commit has been merged in the master branch:
commit 2a3726bf00a8d68082389d51d73e5c56253173d1
Author: Modestas Vainius <modestas at vainius.eu>
Date:   Tue Feb 16 01:35:55 2010 +0200

    Add -q option to pkgkde-gensymbols. -c0 will never fail but still generate a diff.
    
    Use -c0 -q to keep pkgkde-gensymbols completely quiet as before. Merged from my
    dpkg branch.
---
 debian/changelog                 |    2 ++
 symbolshelper/dpkg-gensymbols.1  |   19 ++++++++++++-------
 symbolshelper/dpkg-gensymbols.pl |   37 ++++++++++++++++++++++++-------------
 3 files changed, 38 insertions(+), 20 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index bda7452..510a6eb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
 pkg-kde-tools (0.6.4~pre1) UNRELEASED; urgency=low
 
+  * Add -q option to pkgkde-gensymbols. -c0 will never fail but still generate
+    a diff. Use -c0 -q to keep pkgkde-gensymbols completely quiet as before.
 
  -- Modestas Vainius <modax at debian.org>  Tue, 16 Feb 2010 01:33:48 +0200
 
diff --git a/symbolshelper/dpkg-gensymbols.1 b/symbolshelper/dpkg-gensymbols.1
index a527c5d..450abd0 100644
--- a/symbolshelper/dpkg-gensymbols.1
+++ b/symbolshelper/dpkg-gensymbols.1
@@ -404,17 +404,22 @@ Moreover, some symbols might be omitted when writing a standard
 symbols are always written to the symbol file template.
 .TP
 .BI \-c [0-4]
-Define the checks to do when comparing the generated symbols file
-with the file used as starting point. By default the level is 1.
-Increasing levels do more checks and include all checks of lower levels.
-Level 0 disables all checks. Level 1 fails if some symbols have
-disappeared. Level 2 fails if some new symbols have been introduced.
-Level 3 fails if some libraries have disappeared. Level 4 fails if some
-libraries have been introduced.
+Define the checks to do when comparing the generated symbols file with the
+template file used as starting point. By default the level is 1. Increasing
+levels do more checks and include all checks of lower levels. Level 0 never
+fails. Level 1 fails if some symbols have disappeared. Level 2 fails if some
+new symbols have been introduced. Level 3 fails if some libraries have
+disappeared. Level 4 fails if some libraries have been introduced.
 
 This value can be overridden by the environment variable
 DPKG_GENSYMBOLS_CHECK_LEVEL.
 .TP
+.BI \-q
+Keep quiet and never generate a diff between generated symbols file and the
+template file used as starting point or show any warnings about new/lost
+libraries or new/lost symbols. This option only disables informational output
+but not the checks themselves (see \fI\-c\fR option).
+.TP
 .BI \-a arch
 Assume \fIarch\fR as host architecture when processing symbol files. Use this
 option to generate a symbol file or diff for any architecture provided its
diff --git a/symbolshelper/dpkg-gensymbols.pl b/symbolshelper/dpkg-gensymbols.pl
index 14b561a..e710031 100755
--- a/symbolshelper/dpkg-gensymbols.pl
+++ b/symbolshelper/dpkg-gensymbols.pl
@@ -37,6 +37,7 @@ my $sourceversion;
 my $stdout;
 my $oppackage;
 my $compare = 1; # Bail on missing symbols by default
+my $quiet = 0;
 my $input;
 my $output;
 my $template_mode = 0; # non-template mode by default
@@ -68,11 +69,14 @@ Options:
   -v<version>              version of the packages (defaults to
                            version extracted from debian/changelog).
   -c<level>                compare generated symbols file with the
-                           reference file in the debian directory.
-			   Fails if difference are too important
-			   (level goes from 0 for no check, to 4
-			   for all checks). By default checks at
-			   level 1.
+                           reference template in the debian directory
+                           and fail if difference is too important
+                           (level goes from 0 for no check, to 4
+                           for all checks). By default checks at
+                           level 1.
+  -q                       keep quiet and never emit any warnings or
+                           generate a diff between generated symbols
+                           file and the reference template.
   -I<file>                 force usage of <file> as reference symbols
                            file instead of the default file.
   -O<file>                 write to <file>, not .../DEBIAN/symbols.
@@ -97,6 +101,8 @@ while (@ARGV) {
 	$oppackage = $1;
     } elsif (m/^-c(\d)?$/) {
 	$compare = defined($1) ? $1 : 1;
+    } elsif (m/^-q$/) {
+	$quiet = 1;
     } elsif (m/^-d$/) {
 	$debug = 1;
     } elsif (m/^-v(.+)$/) {
@@ -165,7 +171,7 @@ foreach my $file ($input, $output, "debian/$oppackage.symbols.$host_arch",
     if (defined $file and -e $file) {
 	print "Using references symbols from $file\n" if $debug;
 	$symfile->load($file);
-	$ref_symfile->load($file) if $compare;
+	$ref_symfile->load($file) if $compare || ! $quiet;
 	last;
     }
 }
@@ -243,28 +249,33 @@ if ($stdout) {
 
 # Check if generated files differs from reference file
 my $exitcode = 0;
-if ($compare) {
-    use File::Temp;
-    use Digest::MD5;
+if ($compare || ! $quiet) {
     # Compare
     if (my @libs = $symfile->get_new_libs($ref_symfile)) {
-	warning(_g("new libraries appeared in the symbols file: %s"), "@libs");
+	warning(_g("new libraries appeared in the symbols file: %s"), "@libs")
+	    unless $quiet;
 	$exitcode = 4 if ($compare >= 4);
     }
     if (my @libs = $symfile->get_lost_libs($ref_symfile)) {
-	warning(_g("some libraries disappeared in the symbols file: %s"), "@libs");
+	warning(_g("some libraries disappeared in the symbols file: %s"), "@libs")
+	    unless $quiet;
 	$exitcode = 3 if ($compare >= 3);
     }
     if ($symfile->get_new_symbols($ref_symfile)) {
 	warning(_g("some new symbols appeared in the symbols file: %s"),
-		_g("see diff output below"));
+		_g("see diff output below")) unless $quiet;
 	$exitcode = 2 if ($compare >= 2);
     }
     if ($symfile->get_lost_symbols($ref_symfile)) {
 	warning(_g("some symbols or patterns disappeared in the symbols file: %s"),
-	        _g("see diff output below"));
+	        _g("see diff output below")) unless $quiet;
 	$exitcode = 1 if ($compare >= 1);
     }
+}
+
+unless ($quiet) {
+    use File::Temp;
+    use Digest::MD5;
     # Compare template symbols files before and after
     my $before = File::Temp->new(TEMPLATE=>'dpkg-gensymbolsXXXXXX');
     my $after = File::Temp->new(TEMPLATE=>'dpkg-gensymbolsXXXXXX');

-- 
Debian Qt/KDE packaging tools



More information about the pkg-kde-commits mailing list