[SCM] Debian package checker branch, master, updated. 2.5.7-6-ga22e279
The following commit has been merged in the master branch:
commit a22e27962e62f9d23d46c5c1df0d5f09aeabe52e
Author: Niels Thykier <niels@thykier.net>
Date: Mon May 21 07:07:10 2012 +0200
L::Collect::*: localize $_ to avoid truncating caller's variable
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/checks/scripts b/checks/scripts
index 47d5a4e..4520b09 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -251,15 +251,15 @@ my $pkg = shift;
my $type = shift;
my $info = shift;
-foreach (@{$info->sorted_index}) {
- next if $_ eq '';
- $ELF{$_} = 1 if $info->file_info->{$_} =~ /^[^,]*\bELF\b/o;
+foreach my $file (@{$info->sorted_index}) {
+ next if $file eq '';
+ $ELF{$file} = 1 if $info->file_info->{$file} =~ /^[^,]*\bELF\b/o;
- my $index_info = $info->index->{$_};
+ my $index_info = $info->index->{$file};
my $operm = $index_info->{operm};
next unless $index_info->{type} =~ m,^[-h], and ($operm & 0111);
my $is_suid = $operm & 04000;
- $executable{$_} = 1;
+ $executable{$file} = 1;
}
my $all_parsed = Lintian::Relation->and ($info->relation ('all'),
diff --git a/debian/changelog b/debian/changelog
index 1a66c95..f74c7c7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,10 @@ lintian (2.5.8) UNRELEASED; urgency=low
+ [RA] Remove corrections for "writeable" and "overwriteable". These
spellings are permitted by the OED in UK English. (Closes: #673611)
+ * lib/Lintian/Collect/*.pm:
+ + [NT] Localize "$_" to avoid truncating caller's variable.
+ (Closes: #673613)
+
* t:
+ [NT] Generate empty ".so" files used in the test. This
resolves an issue where dpkg-source would exclude them
diff --git a/lib/Lintian/Collect/Binary.pm b/lib/Lintian/Collect/Binary.pm
index c78afea..d39e7aa 100644
--- a/lib/Lintian/Collect/Binary.pm
+++ b/lib/Lintian/Collect/Binary.pm
@@ -134,6 +134,7 @@ sub scripts {
return $self->{scripts} if exists $self->{scripts};
my $base_dir = $self->base_dir();
my %scripts;
+ local $_;
# sub scripts Needs-Info scripts
open(SCRIPTS, '<', "$base_dir/scripts")
or fail("cannot open scripts $base_dir/file: $!");
@@ -164,6 +165,7 @@ sub objdump_info {
my $base_dir = $self->base_dir();
my %objdump_info;
my ($dynsyms, $file);
+ local $_;
# sub objdump_info Needs-Info objdump-info
open my $fd, '-|', 'gzip', '-dc', "$base_dir/objdump-info.gz"
or fail "cannot open $base_dir/objdump-info.gz: $!";
@@ -249,6 +251,7 @@ sub hardening_info {
my $base_dir = $self->base_dir();
my %hardening_info;
my ($file);
+ local $_;
open(my $idx, '<', "$base_dir/hardening-info")
or fail("cannot open $base_dir/hardening-info: $!");
while (<$idx>) {
@@ -286,6 +289,7 @@ sub java_info {
my $file;
my $file_list = 0;
my $manifest = 0;
+ local $_;
while (<$idx>) {
chomp;
next if m/^\s*$/o;
diff --git a/lib/Lintian/Collect/Changes.pm b/lib/Lintian/Collect/Changes.pm
index 77b2014..9fd03dd 100644
--- a/lib/Lintian/Collect/Changes.pm
+++ b/lib/Lintian/Collect/Changes.pm
@@ -41,6 +41,7 @@ sub files {
my %files;
my $file_list = $self->field('files') || '';
+ local $_;
for (split /\n/, $file_list) {
chomp;
s/^\s+//o;
diff --git a/lib/Lintian/Collect/Package.pm b/lib/Lintian/Collect/Package.pm
index 04a78f0..c295275 100644
--- a/lib/Lintian/Collect/Package.pm
+++ b/lib/Lintian/Collect/Package.pm
@@ -41,6 +41,7 @@ sub file_info {
return $self->{file_info} if exists $self->{file_info};
my $base_dir = $self->base_dir();
my %file_info;
+ local $_;
# sub file_info Needs-Info file-info
open my $idx, '-|', 'gzip', '-dc', "$base_dir/file-info.gz"
or croak "cannot open $base_dir/file-info.gz: $!";
@@ -127,6 +128,7 @@ sub _fetch_index_data {
my (%idxh, %dir_counts);
my $num_idx;
my %rhlinks;
+ local $_;
open my $idx, '-|', 'gzip', '-dc', "$base_dir/${index}.gz"
or croak "cannot open index file $base_dir/${index}.gz: $!";
if ($indexown) {
--
Debian package checker
Reply to: