[SCM] Debian package checker branch, master, updated. 1.24.4-126-g0a2395f
The following commit has been merged in the master branch:
commit 0a2395f81e87eb34f24c8284cf7fcab82262dc37
Author: Frank Lichtenheld <djpig@debian.org>
Date: Sun Sep 14 02:53:29 2008 +0200
checks/scripts: Handle continuation lines in maintainer scripts
Based on a patch by Rafael Laboissiere.
Closes: #495176
diff --git a/checks/scripts b/checks/scripts
index cd19dab..d0ee095 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -471,6 +471,7 @@ while (<SCRIPTS>) {
my $cat_string = "";
my $LEADIN = qr'(?:(?:^|[`&;(|{])\s*|(?:if|then|do|while)\s+)';
+ my $previous_line = "";
while (<C>) {
if ($. == 1 && $shellscript && m,/$base\s*.*\s-\w*e\w*\b,) {
$saw_sete = 1;
@@ -479,7 +480,18 @@ while (<SCRIPTS>) {
next if m,^\s*$,; # skip empty lines
next if m,^\s*\#,; # skip comment lines
s/\#.*$//; # eat comments
- chomp();
+
+ # Concatenate lines containing continuation character (\) at the end
+ if ($shellscript && /\\$/) {
+ s/\\//;
+ chomp;
+ $previous_line .= $_;
+ next;
+ }
+
+ chomp;
+ $_ = $previous_line . $_;
+ $previous_line = "";
# Don't consider the standard dh-make boilerplate to be code. This
# means ignoring the framework of a case statement, the labels, the
diff --git a/debian/changelog b/debian/changelog
index ec723e6..65ed734 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -93,6 +93,8 @@ lintian (2.0.0~rc1) experimental; urgency=low
+ [FL] Check for missing set -e in maintainer scripts. Patch by
Raphael Geissert.
+ [FL] Add mksh as a valid interpreter. (Closes: #498075)
+ + [FL] Handle continued lines in maintainer shell scripts correctly.
+ Based on a patch by Rafael Laboissiere. (Closes: #495176)
* collection/objdump-info:
+ [ADB] Correctly handle shared objects with no symbol versioning when
diff --git a/testset/maintainer-scripts/debian/preinst b/testset/maintainer-scripts/debian/preinst
index bb97763..f01870e 100644
--- a/testset/maintainer-scripts/debian/preinst
+++ b/testset/maintainer-scripts/debian/preinst
@@ -10,3 +10,9 @@ dpkg --assert-long-filenames || exit 1
dpkg --assert-multi-conrep || exit 1
/bin/egrep --mmap "^Package: foo$" /var/lib/dpkg/status
+
+# continuation lines
+update-alternatives --install /usr/bin/fakeroot fakeroot \
+ /usr/bin/fakeroot-ng 5 \
+ --slave /usr/share/man/man1/fakeroot.1.gz \
+ fakeroot.1.gz /usr/share/man/man1/fakeroot-ng.1.gz
--
Debian package checker
Reply to: