[SCM] Debian package checker branch, master, updated. 2.3.0-39-g5ae0b8e
The following commit has been merged in the master branch:
commit 5ae0b8e10e71f47931ba9ac556c877791d8a8b57
Author: Raphael Geissert <atomo64@gmail.com>
Date: Wed Dec 30 19:34:24 2009 -0600
Fix false positive -sourcing-without-test when testing with -r
* checks/init.d:
+ [RG] Also recognise the use of the -r test as a file test when
determining whether a /etc/default file is being sourced
unconditionally.
diff --git a/checks/init.d b/checks/init.d
index fcb3c0f..7de3a36 100644
--- a/checks/init.d
+++ b/checks/init.d
@@ -238,7 +238,7 @@ sub check_init {
# Pretty dummy way to handle conditionals, but should be enough
# for simple init scripts
- $in_file_test = 1 if ($l =~ m/\bif\s+.*?\[\s+-[fe]\s+/);
+ $in_file_test = 1 if ($l =~ m/\bif\s+.*?\[\s+-[efr]\s+/);
$in_file_test = 0 if ($l =~ m/\bfi\b/);
if (!$in_file_test && $l =~ m,^\s*\.\s+["'"]?(/etc/default/[\$\w/-]+),) {
tag "init.d-script-sourcing-without-test", "/etc/init.d/$_:$. $1";
diff --git a/debian/changelog b/debian/changelog
index 0eac44b..d15fdb1 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -30,6 +30,9 @@ lintian (2.3.1) UNRELEASED; urgency=low
+ [RG] Warn about init scripts with incomplete start runlevels.
+ [RG] Tighten check for missing dependency on local_fs or remote_fs
when using files with a name of 'var*' or 'usr*'.
+ + [RG] Also recognise the use of the -r test as a file test when
+ determining whether a /etc/default file is being sourced
+ unconditionally.
* checks/manpages.desc:
+ [RA] Downgrade spelling-error-in-manpage to minor severity.
(Closes: #563039)
diff --git a/t/tests/init.d-general/debian/debian/init.d-general-sourcing-without-test.init b/t/tests/init.d-general/debian/debian/init.d-general-sourcing-without-test.init
index 2325d7a..9a7432e 100644
--- a/t/tests/init.d-general/debian/debian/init.d-general-sourcing-without-test.init
+++ b/t/tests/init.d-general/debian/debian/init.d-general-sourcing-without-test.init
@@ -18,10 +18,18 @@ echo start stop reload restart force-reload status
[ -f /etc/default/bar ] && . /etc/default/bar
+if [ -e /etc/default/locale ]; then
+ . /etc/default/locale
+fi
+
if [ -f /etc/default/moo ]; then
. /etc/default/moo
fi
+if [ -r /etc/default/tmpfs ]; then
+ . /etc/default/tmpfs
+fi
+
PACKAGE=moo
[ -f /etc/default/$PACKAGE ] && . /etc/default/$PACKAGE
--
Debian package checker
Reply to: