[SCM] Debian package checker branch, master, updated. 2.2.14-44-gfee7702
The following commit has been merged in the master branch:
commit ade484daca34f1b8f03423e1dae50994536c1213
Author: Raphael Geissert <atomo64@gmail.com>
Date: Sun Aug 30 20:53:52 2009 -0500
Fix parsing the default-{start,stop} fields of the LSB header
An empty string was being set as the content of a field whenever the
real content evaluated to false, which is incorrect when the content
is a 0 (because it evaluates to false).
diff --git a/checks/init.d b/checks/init.d
index ed740e4..9aa7f47 100644
--- a/checks/init.d
+++ b/checks/init.d
@@ -223,7 +223,7 @@ sub check_init {
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} = length($value)? $value : '';
$last = $keyword;
} elsif ($l =~ /^\#(\t| )/ && $last eq 'description') {
my $value = $l;
@@ -266,7 +266,7 @@ sub check_init {
# Check the runlevels.
my %start;
- if ($lsb{'default-start'}) {
+ if (defined($lsb{'default-start'})) {
for my $runlevel (split (/\s+/, $lsb{'default-start'})) {
if ($runlevel =~ /^[sS0-6]$/) {
$start{lc $runlevel} = 1;
@@ -280,7 +280,7 @@ sub check_init {
}
}
}
- if ($lsb{'default-stop'}) {
+ if (defined($lsb{'default-stop'})) {
my %stop;
for my $runlevel (split (/\s+/, $lsb{'default-stop'})) {
if ($runlevel =~ /^[sS0-6]$/) {
diff --git a/t/tests/fields-essential/debian/debian/control.in b/t/tests/init.d-lsb-headers/debian/debian/control.in
similarity index 67%
copy from t/tests/fields-essential/debian/debian/control.in
copy to t/tests/init.d-lsb-headers/debian/debian/control.in
index 11f1cd0..7a5d193 100644
--- a/t/tests/fields-essential/debian/debian/control.in
+++ b/t/tests/init.d-lsb-headers/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)
+Build-Depends: debhelper (>= 7.0.50~)
Package: {$srcpkg}
-Essential: yes
Architecture: {$architecture}
Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
Description: {$description}
@@ -15,11 +13,10 @@ 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}-parsing
Architecture: {$architecture}
Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
-Description: {$description} -- maybe
- This is another test package designed to exercise some feature or tag of
- Lintian. It is part of the Lintian test suite and may do very odd
+Description: {$description} -- headers parsing
+ This is a test package designed to exercise the parsing of init scripts
+ by 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.init b/t/tests/init.d-lsb-headers/debian/debian/init.d-lsb-headers-parsing.init
similarity index 58%
copy from t/tests/init.d-general/debian/debian/init.d-general.init
copy to t/tests/init.d-lsb-headers/debian/debian/init.d-lsb-headers-parsing.init
index 97ef8f1..e7e4286 100644
--- a/t/tests/init.d-general/debian/debian/init.d-general.init
+++ b/t/tests/init.d-lsb-headers/debian/debian/init.d-lsb-headers-parsing.init
@@ -3,11 +3,11 @@
set -e
### BEGIN INIT INFO
-# Provides: init.d-general
-# Required-Start:
-# Required-Stop:
-# Default-Start:
-# Default-Stop:
+# Provides: init.d-lsb-headers-parsing
+# Required-Start: $local_fs
+# Required-Stop:$local_fs
+# Default-Start: 0
+# Default-Stop: 0
# Short-Description: Do nothing at all
### END INIT INFO
diff --git a/t/tests/init.d-lsb-headers/tags b/t/tests/init.d-lsb-headers/tags
index fa0568d..2cc4689 100644
--- a/t/tests/init.d-lsb-headers/tags
+++ b/t/tests/init.d-lsb-headers/tags
@@ -1,9 +1,12 @@
+E: init.d-lsb-headers-parsing: init.d-script-possible-missing-stop /etc/init.d/init.d-lsb-headers-parsing 1 6
+E: init.d-lsb-headers: init.d-script-possible-missing-stop /etc/init.d/init.d-lsb-headers 1
E: init.d-lsb-headers: init.d-script-should-depend-on-virtual-facility /etc/init.d/init.d-lsb-headers mountall -> $local_fs
E: init.d-lsb-headers: init.d-script-should-depend-on-virtual-facility /etc/init.d/init.d-lsb-headers mountnfs -> $remote_fs
E: init.d-lsb-headers: init.d-script-should-depend-on-virtual-facility /etc/init.d/init.d-lsb-headers networking -> $network
E: init.d-lsb-headers: init.d-script-should-depend-on-virtual-facility /etc/init.d/init.d-lsb-headers portmap -> $portmap
E: init.d-lsb-headers: init.d-script-should-depend-on-virtual-facility /etc/init.d/init.d-lsb-headers sysklogd -> $syslog
-E: init.d-lsb-headers: init.d-script-possible-missing-stop /etc/init.d/init.d-lsb-headers 1
+W: init.d-lsb-headers-parsing: init.d-script-has-conflicting-start-stop /etc/init.d/init.d-lsb-headers-parsing 0
+W: init.d-lsb-headers-parsing: init.d-script-starts-in-stop-runlevel /etc/init.d/init.d-lsb-headers-parsing 0
W: init.d-lsb-headers: init-d-script-stops-in-s-runlevel /etc/init.d/init.d-lsb-headers
W: init.d-lsb-headers: init.d-script-does-not-provide-itself /etc/init.d/init.d-lsb-headers
W: init.d-lsb-headers: init.d-script-has-bad-start-runlevel /etc/init.d/init.d-lsb-headers X
--
Debian package checker
Reply to: