[SCM] Debian package checker branch, master, updated. 1.24.2-73-gae4d0d9
The following commit has been merged in the master branch:
commit ae4d0d983b860e59cf5d1b65e696f72ffa38e402
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date: Tue Aug 5 00:16:45 2008 +0100
Also use Lintian::Collect for index and file-info parsing
* checks/files
+ [ADB] Don't read fields/*, index or file-info directly as the contents
have almost certainly been cached in Lintian::Collect already.
diff --git a/checks/scripts b/checks/scripts
index ea56334..8dd74a5 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -195,28 +195,20 @@ my $pkg = shift;
my $type = shift;
my $info = shift;
-open(INDEX, '<', "index") or fail("cannot open lintian index file: $!");
-while (<INDEX>) {
- next unless (m/^-[rw-]*[xs]/);
- chop;
- s/ link to .*//;
- my $is_suid = m/^-[rw-]*s/;
- $executable{(split(' ', $_, 6))[5]} = 1;
- $suid{(split(' ', $_, 6))[5]} = $is_suid;
+foreach (keys %{$info->index}) {
+ next if $_ eq "";
+ my $index_info = $info->index->{$_};
+ my $operm = $index_info->{operm};
+ next unless ($index_info->{type} =~ m,^[-h], and ($operm & 01 or
+ $operm & 010 or $operm & 0100));
+ my $is_suid = $operm & 04000;
+ $executable{'./' . $_} = 1;
+ $suid{'./' . $_} = $is_suid;
}
-close(INDEX);
-
-# Urgle... this is ambiguous, since the sequence ": " can occur in
-# the output of file and also in the filename.
-# Fortunately no filenames containing ": " currently occur in Debian packages.
-open(FILEINFO, '<', "file-info")
- or fail("cannot open lintian file-info file: $!");
-while (<FILEINFO>) {
- m/^(.*?): (.*)/ or fail("bad line in file-info: $_");
- my $file = $1;
- $ELF{$file} = 1 if $2 =~ /^[^,]*\bELF\b/o;
+
+for my $file (keys %{$info->file_info}) {
+ $ELF{'./' . $file} = 1 if $info->file_info->{$file} =~ /^[^,]*\bELF\b/o;
}
-close(FILEINFO);
my $all_deps = '';
for my $field (qw/suggests recommends depends pre-depends provides/) {
diff --git a/debian/changelog b/debian/changelog
index 311890a..339f991 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -91,8 +91,8 @@ lintian (1.24.3) unstable; urgency=low
* checks/scripts{,.desc}:
+ [RA] Warn about maintainer scripts that prepend a path to commands.
Based on a patch by Raphael Geissert. (Closes: #376184)
- + [ADB] Don't read fields/* directly as the contents have almost certainly
- been cached in Lintian::Collect already.
+ + [ADB] Don't read fields/*, index or file-info directly as the contents
+ have almost certainly been cached in Lintian::Collect already.
+ [ADB] Update a couple of Policy references. Thanks Jordà Polo.
* checks/shared-libs.{,desc}:
+ [ADB] Improve the description of no-symbols-control-file.
--
Debian package checker
Reply to: