lintian: r1041 - in trunk: checks debian frontend testset/manpages/debian
Author: rra
Date: 2007-12-04 09:34:41 +0100 (Tue, 04 Dec 2007)
New Revision: 1041
Modified:
trunk/checks/lintian.desc
trunk/debian/changelog
trunk/frontend/lintian
trunk/testset/manpages/debian/overrides
Log:
+ [RA] Diagnose malformed override entries; don't just ignore them.
+ [RA] Fix some odd formatting.
Modified: trunk/checks/lintian.desc
===================================================================
--- trunk/checks/lintian.desc 2007-12-04 08:18:01 UTC (rev 1040)
+++ trunk/checks/lintian.desc 2007-12-04 08:34:41 UTC (rev 1041)
@@ -55,3 +55,15 @@
Type: info
Info: Lintian discovered an unused override entry in its database.
Please remove it from the overrides file if it is not needed anymore.
+
+Tag: malformed-override
+Type: error
+Info: Lintian discovered an override entry with an invalid format. An
+ override entry should have the format:
+ .
+ <package>[ <type>]: <tag>[ <extra> ...]
+ .
+ where <package> is the package name, the optional <type> parameter
+ specifies the package type (binary is the default), <tag> is the tag to
+ suppress, and <extra> is any specific information for the particular tag
+ to suppress.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2007-12-04 08:18:01 UTC (rev 1040)
+++ trunk/debian/changelog 2007-12-04 08:34:41 UTC (rev 1041)
@@ -93,6 +93,8 @@
* frontend/lintian:
+ [RA] Add critical as a recognized urgency.
+ + [RA] Diagnose malformed override entries; don't just ignore them.
+ + [RA] Fix some odd formatting.
* man/lintian.1:
+ [RA] Be clearer about what files lintian takes as arguments; in
@@ -110,7 +112,7 @@
writing them to the index (uncovered when someone accidentally
appended a package description to Standards-Version).
- -- Russ Allbery <rra@debian.org> Tue, 04 Dec 2007 00:12:10 -0800
+ -- Russ Allbery <rra@debian.org> Tue, 04 Dec 2007 00:34:36 -0800
lintian (1.23.36) unstable; urgency=low
Modified: trunk/frontend/lintian
===================================================================
--- trunk/frontend/lintian 2007-12-04 08:18:01 UTC (rev 1040)
+++ trunk/frontend/lintian 2007-12-04 08:34:41 UTC (rev 1041)
@@ -1248,12 +1248,12 @@
}
# chdir to base directory
- unless (chdir($base))
- { print STDERR "internal error: could not chdir into directory $base: $!\n";
- print "N: Skipping $action of $long_type package $pkg\n";
- $exit_code = 2;
- next PACKAGE;
- }
+ unless (chdir($base)) {
+ print STDERR "internal error: could not chdir into directory $base: $!\n";
+ print "N: Skipping $action of $long_type package $pkg\n";
+ $exit_code = 2;
+ next PACKAGE;
+ }
# collect info
remove_status_file($base);
@@ -1270,28 +1270,26 @@
if ($action eq 'check') { # read override file
Tags::set_pkg( $file, $pkg, "", "", $long_type );
+ unless ($no_override) {
+ if (open(O, '<', "$base/override")) {
+ while (<O>) {
+ chomp;
+ next if m,^\s*(\#|\z),o;
+ s/^\s+//o;
+ s/\s+$//o;
+ s/\s+/ /go;
- unless ($no_override)
- { if ( open(O, '<', "$base/override") )
- {
- while (<O>) {
- chomp;
- next if m,^\s*(\#|$),o;
+ if (s/^\Q$pkg\E( \Q$long_type\E)?: //) {
+ next if $_ eq '';
+ Tags::add_override($_);
+ } else {
+ tag ('malformed-override', $_);
+ }
+ }
+ close(O);
+ }
+ }
- # TODO: warn if no $pkg: thing is there...
- s/^\Q$pkg\E://;
- s/^\Q$pkg $long_type\E://;
- s/^\s+//o;
- s/\s+$//o;
- s/\s+/ /go;
- next if $_ eq '';
-
- Tags::add_override($_);
- }
- close(O);
- }
- }
-
# perform checks
for my $check (keys %checks) {
my $ci = $check_info{$check};
Modified: trunk/testset/manpages/debian/overrides
===================================================================
--- trunk/testset/manpages/debian/overrides 2007-12-04 08:18:01 UTC (rev 1040)
+++ trunk/testset/manpages/debian/overrides 2007-12-04 08:34:41 UTC (rev 1041)
@@ -1,2 +1,8 @@
-manpages: no-copyright-file
+ manpages: no-copyright-file
manpages: foo-tag-that-does-not-exist
+# this is a valid comment
+
+
+
+#and some empty lines
+but-this-is-just-broken
Reply to: