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

lintian: r744 - in trunk: checks debian testset/scripts



Author: rra
Date: 2006-09-12 01:21:51 +0200 (Tue, 12 Sep 2006)
New Revision: 744

Modified:
   trunk/checks/init.d
   trunk/debian/changelog
   trunk/testset/scripts/init-lsb-broken
Log:
* checks/init.d:
  + [RA] Correctly handle LSB keywords which are present but have an
    empty value.  Reported by Erich Schubert.  (Closes: #386968)

Modified: trunk/checks/init.d
===================================================================
--- trunk/checks/init.d	2006-09-11 17:37:33 UTC (rev 743)
+++ trunk/checks/init.d	2006-09-11 23:21:51 UTC (rev 744)
@@ -176,10 +176,10 @@
 			my $keyword = lc $1;
 			my $value = $2;
 			tag "init.d-script-has-duplicate-lsb-keyword", "/etc/init.d/$_:$. $keyword"
-			    if $lsb{$keyword};
+			    if (defined $lsb{$keyword});
 			tag "init.d-script-has-unknown-lsb-keyword", "/etc/init.d/$_:$. $keyword"
 			    unless (defined ($lsb_keywords{$keyword}) || $keyword =~ /^x-/);
-			$lsb{$keyword} = $value;
+			$lsb{$keyword} = $value || '';
 			$last = $keyword;
 		    } elsif ($l =~ /^\#(\t|  )/ && $last eq 'description') {
 			my $value = $l;
@@ -202,7 +202,7 @@
 	    tag "init.d-script-missing-lsb-section", "/etc/init.d/$_";
 	} else {
 	    for my $keyword (keys %lsb_keywords) {
-		if ($lsb_keywords{$keyword} && !$lsb{$keyword}) {
+		if ($lsb_keywords{$keyword} && !defined $lsb{$keyword}) {
 		    tag "init.d-script-missing-lsb-keyword", "/etc/init.d/$_ $keyword";
 		}
 	    }

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-09-11 17:37:33 UTC (rev 743)
+++ trunk/debian/changelog	2006-09-11 23:21:51 UTC (rev 744)
@@ -3,11 +3,14 @@
   * checks/debconf:
     + [CW] Don't trigger partially-translated-question when Choices-C exists
       but not Description-C.
+  * checks/init.d:
+    + [RA] Correctly handle LSB keywords which are present but have an
+      empty value.  Reported by Erich Schubert.  (Closes: #386968)
   * checks/scripts:
     + [RA] Add /usr/bin/gosh from the gauche package to the list of valid
       interpreters.  Thanks, Tatsuya Kinoshita.  (Closes: #386798)
 
- -- Russ Allbery <rra@debian.org>  Sun, 10 Sep 2006 12:00:48 -0700
+ -- Russ Allbery <rra@debian.org>  Mon, 11 Sep 2006 16:16:13 -0700
 
 lintian (1.23.24) unstable; urgency=low
 

Modified: trunk/testset/scripts/init-lsb-broken
===================================================================
--- trunk/testset/scripts/init-lsb-broken	2006-09-11 17:37:33 UTC (rev 743)
+++ trunk/testset/scripts/init-lsb-broken	2006-09-11 23:21:51 UTC (rev 744)
@@ -2,7 +2,7 @@
 ### BEGIN INIT INFO
 # Provides:          bad-lsb
 #  Required-Start:    $local_fs $remote_fs
-# Required-Stop:     $local_fs $remote_fs
+# Required-Stop:     
 # Default-Start:     1 2 3 4 5
 # Default-Stop:      S 0 1 6 X
 # Short-Description: Example initscript



Reply to: