[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

lintian: r1131 - in trunk: debian frontend testset testset/manpages/debian



Author: rra
Date: 2008-01-22 02:26:03 +0100 (Tue, 22 Jan 2008)
New Revision: 1131

Modified:
   trunk/debian/changelog
   trunk/frontend/lintian
   trunk/testset/manpages/debian/overrides
   trunk/testset/manpages/debian/rules
   trunk/testset/tags.manpages
Log:
* frontend/lintian:
  + [RA] Include info tags in the broken-down description of the
    override count since they're included in the total.  Based on a
    patch by Chris Lamb.  (Closes: #459851)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-01-20 20:54:50 UTC (rev 1130)
+++ trunk/debian/changelog	2008-01-22 01:26:03 UTC (rev 1131)
@@ -11,11 +11,16 @@
   * checks/menu-format:
     + [RA] Avoid a Perl warning for desktop entries without Exec.
 
+  * frontend/lintian:
+    + [RA] Include info tags in the broken-down description of the
+      override count since they're included in the total.  Based on a
+      patch by Chris Lamb.  (Closes: #459851)
+
   * lib/Spelling.pm:
     + [RA] Add a spelling correction for PostgreSQL and lots of new
       capitalization corrections after a debian-devel thread.
 
- -- Russ Allbery <rra@debian.org>  Mon, 07 Jan 2008 23:58:47 -0800
+ -- Russ Allbery <rra@debian.org>  Mon, 21 Jan 2008 17:25:43 -0800
 
 lintian (1.23.42) unstable; urgency=low
 

Modified: trunk/frontend/lintian
===================================================================
--- trunk/frontend/lintian	2008-01-20 20:54:50 UTC (rev 1130)
+++ trunk/frontend/lintian	2008-01-22 01:26:03 UTC (rev 1131)
@@ -1363,15 +1363,17 @@
 	    }
 	}
 
-        # Report override statistics.
-        if (not $no_override and not $show_overrides) {
-            my $stats = Tags::get_stats($file);
-            my $short = $file;
-            $short =~ s%.*/%%;
-            my $errors = $stats->{overrides}{by_severity}{4} || 0;
-            my $warnings = $stats->{overrides}{by_severity}{2} || 0;
+	# Report override statistics.
+	if (not $no_override and not $show_overrides) {
+	    my $stats = Tags::get_stats($file);
+	    my $short = $file;
+	    $short =~ s%.*/%%;
+	    my $errors = $stats->{overrides}{by_severity}{4} || 0;
+	    my $warnings = $stats->{overrides}{by_severity}{2} || 0;
+	    my $info = $stats->{overrides}{by_severity}{0} || 0;
 	    $overrides{errors} += $errors;
 	    $overrides{warnings} += $warnings;
+	    $overrides{info} += $info;
         }
     }
 
@@ -1424,24 +1426,23 @@
 if (not $quiet and not $no_override and not $show_overrides) {
     my $errors = $overrides{errors};
     my $warnings = $overrides{warnings};
-    my $total = $errors + $warnings;
+    my $info = $overrides{info};
+    my $total = $errors + $warnings + $info;
     if ($total > 0) {
 	my $total = ($total == 1)
 	    ? "$total tag overridden"
 	    : "$total tags overridden";
+	my @output;
 	if ($errors) {
-	    $errors = ($errors == 1) ? "$errors error" : "$errors errors";
+	    push (@output, ($errors == 1) ? "$errors error" : "$errors errors");
 	}
 	if ($warnings) {
-	    $warnings = ($warnings == 1) ? "$warnings warning" : "$warnings warnings";
+	    push (@output, ($warnings == 1) ? "$warnings warning" : "$warnings warnings");
 	}
-	if ($errors and $warnings) {
-	    print "N: $total ($errors, $warnings)\n";
-	} elsif ($errors) {
-	    print "N: $total ($errors)\n";
-	} elsif ($warnings) {
-	    print "N: $total ($warnings)\n";
+	if ($info) {
+	    push (@output, "$info info");
 	}
+	print "N: $total (", join (', ', @output), ")\n";
     }
 }
 

Modified: trunk/testset/manpages/debian/overrides
===================================================================
--- trunk/testset/manpages/debian/overrides	2008-01-20 20:54:50 UTC (rev 1130)
+++ trunk/testset/manpages/debian/overrides	2008-01-22 01:26:03 UTC (rev 1131)
@@ -7,3 +7,6 @@
 #and some empty lines
 but-this-is-just-broken!
 manpages:
+
+# An 'info' tag:
+package-contains-empty-perl-directory

Modified: trunk/testset/manpages/debian/rules
===================================================================
--- trunk/testset/manpages/debian/rules	2008-01-20 20:54:50 UTC (rev 1130)
+++ trunk/testset/manpages/debian/rules	2008-01-22 01:26:03 UTC (rev 1131)
@@ -65,6 +65,9 @@
 	install -m644 foo.info $(tmp)/usr/share/info/baz.broken.gz
 	touch $(tmp)/usr/share/info/image.png
 
+# Emit an info tag to test override handling.
+	mkdir -p $(tmp)/usr/lib/perl5
+
 	install -d $(tmp)/usr/share/doc/manpages
 	cp debian/changelog $(tmp)/usr/share/doc/manpages/changelog
 	gzip -9 $(tmp)/usr/share/doc/manpages/changelog

Modified: trunk/testset/tags.manpages
===================================================================
--- trunk/testset/tags.manpages	2008-01-20 20:54:50 UTC (rev 1130)
+++ trunk/testset/tags.manpages	2008-01-22 01:26:03 UTC (rev 1131)
@@ -34,7 +34,7 @@
 E: manpages: x11-games-should-be-in-usr-games usr/X11R6/man/man6/X11R6-binary.man
 I: manpages: no-md5sums-control-file
 I: manpages: unused-override foo-tag-that-does-not-exist
-N: 1 tag overridden (1 error)
+N: 2 tags overridden (1 error, 1 info)
 W: manpages source: ancient-standards-version 3.2.1 (current is 3.7.3)
 W: manpages source: binary-nmu-debian-revision-in-source 4-0.0.1
 W: manpages source: changelog-should-mention-nmu


Reply to: