[SCM] Debian package checker branch, master, updated. 1.24.2-88-ga6300bf
The following commit has been merged in the master branch:
commit a6300bf76bb3a8898a5a296e401cb99f3a497d7e
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date: Wed Aug 6 21:05:39 2008 +0100
Convert the users of "scripts" to using Lintian::Collect::Binary::scripts
diff --git a/checks/debconf b/checks/debconf
index 0dcb8ed..43731ba 100644
--- a/checks/debconf
+++ b/checks/debconf
@@ -511,14 +511,7 @@ if ($usespreinst) {
return 0 if ($pkg eq "debconf") || ($type eq 'udeb');
-open(SCRIPTS, '<', "scripts") or fail("cannot open lintian scripts file: $!");
-while (<SCRIPTS>) {
- chomp;
-
- # From checks/scripts.
- my ($calls_env, $interpreter, $filename) = m/^(env )?(\S*) (.*)$/
- or fail("bad line in scripts file: $_");
-
+foreach my $filename (sort keys %{$info->scripts}) {
open(IN, '<', "unpacked/$filename") or fail("cannot open $filename: $!");
while (<IN>) {
s/#.*//; # Not perfect for Perl, but should be OK
@@ -530,7 +523,6 @@ while (<SCRIPTS>) {
}
close IN;
}
-close SCRIPTS;
} # </run>
diff --git a/checks/files b/checks/files
index 71b351e..de9c919 100644
--- a/checks/files
+++ b/checks/files
@@ -42,7 +42,6 @@ my $has_binary_perl_file;
my @nonbinary_perl_files_in_lib;
my %linked_against_libvga;
-my %script = ();
# read data from objdump-info file
foreach my $file (sort keys %{$info->objdump_info}) {
@@ -67,15 +66,7 @@ if (defined $info->field('section')) {
}
# find out which files are scripts
-open(SCRIPTS, '<', "scripts") or fail("cannot open lintian scripts file: $!");
-while (<SCRIPTS>) {
- chop;
- m/^(?:env )?(\S*) (.*)$/ or fail("bad line in scripts file: $_");
- my $filename = $2;
- $filename =~ s%^\./%%;
- $script{$filename} = 1;
-}
-close(SCRIPTS);
+my %script = map {$_ => 1} (sort keys %{$info->scripts});
# We only want to warn about these once.
my $warned_x11_predepends = 0;
diff --git a/checks/scripts b/checks/scripts
index af3eb8a..1712b59 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -225,15 +225,10 @@ $all_deps .= ', ' if $all_deps;
$all_deps .= $pkg;
$deps{all} = Dep::parse($all_deps);
-open(SCRIPTS, '<', "scripts") or fail("cannot open lintian scripts file: $!");
-while (<SCRIPTS>) {
- chop;
-
- # This used to be split(' ', $_, 2), but that didn't handle empty
- # interpreter lines correctly.
- my ($calls_env, $interpreter, $filename) = m/^(env )?(\S*) (.*)$/ or
- fail("bad line in scripts file: $_");
-
+for my $filename (sort keys %{$info->scripts}) {
+ my $interpreter = $info->scripts->{$filename}->{interpreter};
+ my $calls_env = $info->scripts->{$filename}->{calls_env};
+ $filename = './' . $filename;
$scripts{$filename} = 1;
# no checks necessary at all for scripts in /usr/share/doc/
@@ -384,7 +379,6 @@ while (<SCRIPTS>) {
}
}
}
-close(SCRIPTS);
foreach (keys %executable) {
tag("executable-not-elf-or-script", $_)
diff --git a/debian/changelog b/debian/changelog
index 7e02992..7b1fd1e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,7 +21,7 @@ lintian (1.24.3) unstable; urgency=low
+ [ADB] Don't complain about unused debconf templates in udebs.
(Closes: #491135)
+ [RA] Try to recognize at least some debconf template uses in Perl.
- + [ADB] Replace fields/* access with Lintian::Collect::field()
+ + [ADB] Replace fields/* and scripts access with Lintian::Collect
+ [ADB] Don't flag the shared templates used for dictionaries-common
co-ordination as unused.
+ [FL] Remove debconf-error-requires-versioned-depends since post-lenny
@@ -99,8 +99,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/*, index or file-info directly as the contents
- have almost certainly been cached in Lintian::Collect already.
+ + [ADB] Don't read fields/*, scripts, 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: