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

[SCM] Debian package checker branch, master, updated. 2.2.11-29-g22733cd



The following commit has been merged in the master branch:
commit 760faac7bc2818e03d22fdd51d984e856bb37cf2
Author: Raphael Geissert <atomo64@gmail.com>
Date:   Sun Jun 14 19:57:25 2009 -0500

    Ignore required init.d options in comments
    
    The regular expression in use was not correctly dealing with comments,
    which could result in many false negatives when finding the required
    option keyword in a comment.

diff --git a/checks/init.d b/checks/init.d
index c1e9798..84b5993 100644
--- a/checks/init.d
+++ b/checks/init.d
@@ -192,7 +192,7 @@ for (keys %initd_postinst) {
 		}
 	    }
 
-	    while ($l =~ s/(start|stop|restart|force-reload)//o) {
+	    while ($l =~ s/^[^#]*?(start|stop|restart|force-reload)//o) {
 		$tag{$1} = 1;
 	    }
         }
diff --git a/t/tests/fields-essential/debian/debian/control.in b/t/tests/init.d-general/debian/debian/control.in
similarity index 79%
copy from t/tests/fields-essential/debian/debian/control.in
copy to t/tests/init.d-general/debian/debian/control.in
index 11f1cd0..dffb079 100644
--- a/t/tests/fields-essential/debian/debian/control.in
+++ b/t/tests/init.d-general/debian/debian/control.in
@@ -3,11 +3,9 @@ Priority: extra
 Section: {$section}
 Maintainer: {$author}
 Standards-Version: {$standards_version}
-XS-Essential: no
 Build-Depends: debhelper (>= 7)
 
 Package: {$srcpkg}
-Essential: yes
 Architecture: {$architecture}
 Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
 Description: {$description}
@@ -15,11 +13,12 @@ Description: {$description}
  Lintian.  It is part of the Lintian test suite and may do very odd
  things.  It should not be installed like a regular package.
 
-Package: {$srcpkg}2
-Essential: maybe
+Package: {$srcpkg}-bugs
 Architecture: {$architecture}
 Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
-Description: {$description} -- maybe
- This is another test package designed to exercise some feature or tag of
+Description: {$description} -- bugs
+ Test some simple bugs in the check
+ .
+ This is a test package designed to exercise some feature or tag of
  Lintian.  It is part of the Lintian test suite and may do very odd
  things.  It should not be installed like a regular package.
diff --git a/t/tests/init.d-general/debian/debian/init.d-general-bugs.init b/t/tests/init.d-general/debian/debian/init.d-general-bugs.init
new file mode 100644
index 0000000..5547e49
--- /dev/null
+++ b/t/tests/init.d-general/debian/debian/init.d-general-bugs.init
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+### BEGIN INIT INFO
+# Provides:          nothing
+# Required-Start:
+# Required-Stop:
+# Default-Start:
+# Default-Stop:
+# Short-Description: Do nothing at all
+### END INIT INFO
+
+# start stop force-reload restart status
diff --git a/t/tests/init.d-general/debian/debian/init.d-general.init b/t/tests/init.d-general/debian/debian/init.d-general.init
new file mode 100644
index 0000000..c277e99
--- /dev/null
+++ b/t/tests/init.d-general/debian/debian/init.d-general.init
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+### BEGIN INIT INFO
+# Provides:          nothing
+# Required-Start:
+# Required-Stop:
+# Default-Start:
+# Default-Stop:
+# Short-Description: Do nothing at all
+### END INIT INFO
+
+case "$1" in
+    start|stop|force-reload|restart|status|*)
+	echo hello world!
+    ;;
+esac
diff --git a/t/tests/init.d-general/desc b/t/tests/init.d-general/desc
new file mode 100644
index 0000000..71518ab
--- /dev/null
+++ b/t/tests/init.d-general/desc
@@ -0,0 +1,6 @@
+Testname: init.d-general
+Sequence: 6000
+Version: 1.0
+Description: Test tags related to the init.d checks
+Test-For:
+  init.d-script-does-not-implement-required-option
\ No newline at end of file
diff --git a/t/tests/init.d-general/tags b/t/tests/init.d-general/tags
new file mode 100644
index 0000000..0f20825
--- /dev/null
+++ b/t/tests/init.d-general/tags
@@ -0,0 +1,4 @@
+E: init.d-general-bugs: init.d-script-does-not-implement-required-option /etc/init.d/init.d-general-bugs force-reload
+E: init.d-general-bugs: init.d-script-does-not-implement-required-option /etc/init.d/init.d-general-bugs restart
+E: init.d-general-bugs: init.d-script-does-not-implement-required-option /etc/init.d/init.d-general-bugs start
+E: init.d-general-bugs: init.d-script-does-not-implement-required-option /etc/init.d/init.d-general-bugs stop

-- 
Debian package checker


Reply to: