[SCM] Debian package checker branch, master, updated. 2.5.2-107-g06ac08e
The following commit has been merged in the master branch:
commit 06ac08e3127b8d1bcb91ca1056862efcc6908188
Author: Niels Thykier <niels@thykier.net>
Date: Wed Sep 7 09:11:01 2011 +0200
Remove script-calls-init-script-directly
diff --git a/checks/scripts b/checks/scripts
index bcb0526..0e00823 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -449,41 +449,6 @@ for my $filename (sort keys %{$info->scripts}) {
script_tag('unusual-interpreter', $filename, "#!$interpreter");
}
- # Do some additional checks on shell scripts in /etc. This should
- # probably be extended eventually to any script in a public directory.
- # This also needs smarter processing of multiline quoted strings,
- # heredocs, and so forth. Hopefully it will do for right now.
- if ($filename =~ m,^etc/, and $base =~ /^$known_shells_regex$/) {
- my ($saw_init, $saw_invoke);
- local $.;
- open(FH, '<', $path);
- while (<FH>) {
- next if m,^\s*$,; # skip empty lines
- next if m,^\s*\#,; # skip comment lines
- $_ = remove_comments($_);
- chomp;
-
- # Check for running init scripts directly instead of via
- # invoke-rc.d. Scripts are allowed to reinvoke themselves with a
- # different argument; some init scripts implement actions that
- # way. Scripts are also allowed to do this for actions other than
- # those defined for invoke-rc.d.
- if (m,$LEADIN/etc/init.d/(\S+)\s+[\"\']?(\S+)[\"\']?,) {
- my ($script, $action) = ($1, $2);
- next if "etc/init.d/$script" eq $filename;
- next unless $action =~ /^(force-)?(start|stop|restart|reload|status)$/;
- $saw_init = $.;
- }
- if (m%^\s*invoke-rc\.d\s+%) {
- $saw_invoke = 1;
- }
- }
- close(FH);
- if ($saw_init and not $saw_invoke) {
- tag 'script-calls-init-script-directly', "$filename:$saw_init";
- }
- }
-
# If we found the interpreter and the script is executable, check
# dependencies. This should be the last thing we do in the loop so that
# we can use next for an early exit and reduce the nesting.
diff --git a/checks/scripts.desc b/checks/scripts.desc
index efca4af..10ac00d 100644
--- a/checks/scripts.desc
+++ b/checks/scripts.desc
@@ -492,15 +492,6 @@ Info: This script apparently runs an init script directly rather than
available.
Ref: policy 9.3.3.2
-Tag: script-calls-init-script-directly
-Severity: normal
-Certainty: possible
-Info: This script apparently runs an init script directly rather than
- using <tt>invoke-rc.d</tt>. While use of <tt>invoke-rc.d</tt> is only
- required for maintainer scripts, supporting the policy layer that it
- implements is a good idea in any script.
-Ref: policy 9.3.3.2
-
Tag: gconftool-used-in-maintainer-script
Severity: normal
Certainty: possible
diff --git a/debian/changelog b/debian/changelog
index 617cd07..63c87b2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -26,6 +26,7 @@ lintian (2.5.3) UNRELEASED; urgency=low
+ Removed:
- debian-changelog-file-contains-debmake-default-email-address
- readme-debian-contains-debmake-default-email-address
+ - script-calls-init-script-directly
* checks/*:
+ [NT] Dropped fields from Needs-Info, it is no longer needed.
@@ -102,6 +103,8 @@ lintian (2.5.3) UNRELEASED; urgency=low
+ [NT] Do a simple and minimal variable tracking. In very simple
cases, it can determine which targets a variable contains (when
the variable is used as a target). (Closes: #638411)
+ * checks/scripts{,.desc}:
+ + [NT] Remove script-calls-init-script-directly. (Closes: #617959)
* checks/shared-libs{,.desc}:
+ [JW] Fixed a typo in a tag description. (Closes: #639177)
+ [NT] Do not emit shlib-calls-exit for libraries that have an
diff --git a/t/tests/scripts-calls-init-script/desc b/t/tests/scripts-calls-init-script/desc
index af391ed..30c46de 100644
--- a/t/tests/scripts-calls-init-script/desc
+++ b/t/tests/scripts-calls-init-script/desc
@@ -4,5 +4,4 @@ Version: 1.0
Description: Test proper use of invoke-rc.d
Test-For:
maintainer-script-calls-init-script-directly
- script-calls-init-script-directly
References: Debian Bug#381485
diff --git a/t/tests/scripts-calls-init-script/tags b/t/tests/scripts-calls-init-script/tags
index cbd0b2d..f1cbd81 100644
--- a/t/tests/scripts-calls-init-script/tags
+++ b/t/tests/scripts-calls-init-script/tags
@@ -1,2 +1 @@
E: scripts-calls-init-script: maintainer-script-calls-init-script-directly postinst:5
-W: scripts-calls-init-script: script-calls-init-script-directly etc/cron.daily/bad:2
--
Debian package checker
Reply to: