lintian: r1247 - in trunk: checks debian
Author: rra
Date: 2008-03-04 22:13:58 +0100 (Tue, 04 Mar 2008)
New Revision: 1247
Modified:
trunk/checks/scripts
trunk/debian/changelog
Log:
* checks/scripts:
+ [RA] Attempt to quash some Perl warnings.
Modified: trunk/checks/scripts
===================================================================
--- trunk/checks/scripts 2008-03-04 02:30:52 UTC (rev 1246)
+++ trunk/checks/scripts 2008-03-04 21:13:58 UTC (rev 1247)
@@ -302,12 +302,12 @@
my $versioned = 0;
if (not defined $data) {
$data = $versioned_interpreters{$base};
- undef $data if ($data && not defined ($data->[1]));
+ undef $data if ($data and not defined ($data->[1]));
if (not defined ($data) and $base =~ /^(.*[^\d.-])-?[\d.]+$/) {
$data = $versioned_interpreters{$1};
- undef $data unless $base =~ /$data->[2]/;
+ undef $data unless ($data and $base =~ /$data->[2]/);
}
- $versioned = 1;
+ $versioned = 1 if $data;
}
if ($data) {
my $expected = $data->[0] . '/' . $base;
@@ -578,25 +578,27 @@
# since this test is ugly, I have to do it by itself
# detect source (.) trying to pass args to the command it runs
if (not $found and m/^\s*(\.\s+[^\s;\`]+\s+([^\s;]+))/) {
- if ($2 =~ /^(\&|\||\d?>|<)/) {
+ my $extra;
+ ($match, $extra) = ($1, $2);
+ if ($extra =~ /^(\&|\||\d?>|<)/) {
# everything is ok
;
} else {
$found = 1;
- $match = $1;
}
}
# Ignore anything inside single quotes; it could be an
# argument to grep or the like.
my $line = $_;
- $line =~ s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g;
-
- for my $re (@bashism_string_regexs) {
- if ($line =~ m/($re)/) {
- $found = 1;
- ($match) = m/($re)/;
- last;
+ unless ($found) {
+ $line =~ s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g;
+ for my $re (@bashism_string_regexs) {
+ if ($line =~ m/($re)/) {
+ $found = 1;
+ ($match) = m/($re)/;
+ last;
+ }
}
}
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-03-04 02:30:52 UTC (rev 1246)
+++ trunk/debian/changelog 2008-03-04 21:13:58 UTC (rev 1247)
@@ -1,3 +1,10 @@
+lintian (1.23.47) UNRELEASED; urgency=low
+
+ * checks/scripts:
+ + [RA] Attempt to quash some Perl warnings.
+
+ -- Russ Allbery <rra@debian.org> Tue, 04 Mar 2008 13:07:18 -0800
+
lintian (1.23.46) unstable; urgency=low
The "five Lintian committers!" release.
Reply to: