[SCM] Debian package checker branch, master, updated. 1.24.2-43-gbfbc0ef
The following commit has been merged in the master branch:
commit bfbc0ef7b56c550a170d3be0610a4007537928eb
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date: Mon Jul 28 21:32:58 2008 +0100
Account for the fact that filenames in "scripts" start with "./" and may start "env "
* checks/files:
+ [ADB] Fix a couple of bugs in the parsing of the list of scripts
contained within a package which led to scripts in /usr/share/doc
being incorrectly tagged as executable-in-usr-share-doc.
diff --git a/checks/files b/checks/files
index caf625a..64b6ce3 100644
--- a/checks/files
+++ b/checks/files
@@ -68,8 +68,10 @@ if (defined $info->field('section')) {
open(SCRIPTS, '<', "scripts") or fail("cannot open lintian scripts file: $!");
while (<SCRIPTS>) {
chop;
- m/^(\S*) (.*)$/ or fail("bad line in scripts file: $_");
- $script{$2} = 1;
+ m/^(?:env )?(\S*) (.*)$/ or fail("bad line in scripts file: $_");
+ my $filename = $2;
+ $filename =~ s%^\./%%;
+ $script{$filename} = 1;
}
close(SCRIPTS);
diff --git a/debian/changelog b/debian/changelog
index c9bf682..8c6fba5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -32,6 +32,9 @@ lintian (1.24.3) unstable; urgency=low
* checks/files:
+ [ADB] Begin switching to Lintian::Collect. Currently objdump-info
parsing and fields/* reading have been migrated.
+ + [ADB] Fix a couple of bugs in the parsing of the list of scripts
+ contained within a package which led to scripts in /usr/share/doc
+ being incorrectly tagged as executable-in-usr-share-doc.
* checks/huge-usr-share:
+ [ADB] Replace (the single) direct access to fields/* with ::field()
* checks/manpages:
diff --git a/testset/scripts/debian/rules b/testset/scripts/debian/rules
index 55af295..3a4ab8c 100755
--- a/testset/scripts/debian/rules
+++ b/testset/scripts/debian/rules
@@ -26,8 +26,12 @@ binary-indep:
install -m 755 jruby-broken $(tmp)/usr/bin/
install -m 755 pyfoo $(tmp)/usr/bin/
install -m 755 py2foo $(tmp)/usr/bin/
+# This uses "env" and should trigger script-in-usr-share-doc
+ install -m 755 py2foo $(tmp)/usr/share/doc/scripts/
install -m 755 perlfoo $(tmp)/usr/bin/
install -m 755 rubyfoo $(tmp)/usr/bin/
+# This doesn't use "env" but should also trigger script-in-usr-share-doc
+ install -m 755 rubyfoo $(tmp)/usr/share/doc/scripts/
install -m 755 make-foo $(tmp)/usr/bin/
install -m 755 lefty-foo $(tmp)/usr/bin/
install -m 4751 perlfoo $(tmp)/usr/bin/suidperlfoo2
diff --git a/testset/tags.scripts b/testset/tags.scripts
index 8f49ee4..bfb4eca 100644
--- a/testset/tags.scripts
+++ b/testset/tags.scripts
@@ -21,6 +21,8 @@ E: scripts_6ds-1ubuntu0.5.10.1_arch.changes: bad-ubuntu-distribution-in-changes-
I: scripts source: debian-watch-file-should-dversionmangle-not-uversionmangle
I: scripts: init.d-script-missing-lsb-short-description /etc/init.d/lsb-other
I: scripts: no-md5sums-control-file
+I: scripts: script-in-usr-share-doc usr/share/doc/scripts/py2foo
+I: scripts: script-in-usr-share-doc usr/share/doc/scripts/rubyfoo
W: scripts source: ancient-standards-version 3.2.1 (current is 3.8.0)
W: scripts source: binary-arch-rules-but-pkg-is-arch-indep
W: scripts source: debian-watch-file-uses-deprecated-sf-redirector-method
--
Debian package checker
Reply to: