summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorschmonz <schmonz>2013-03-26 15:11:20 +0000
committerschmonz <schmonz>2013-03-26 15:11:20 +0000
commitb2543542006679e045a87d904d143651719eaf93 (patch)
treed90e620750839e97e0a09bfcadd313889ae19002 /pkgtools
parenta891038c092424d73de7a464ce29dd377f521562 (diff)
downloadpkgsrc-b2543542006679e045a87d904d143651719eaf93.tar.gz
Excessive self-grepping causes bugginess. Don't!
This regex almost certainly didn't intend to match an occurrence of "ARRAY" in PkgLint::Line, but it did match.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl7
-rw-r--r--pkgtools/pkglint/files/pkglint.t4
2 files changed, 4 insertions, 7 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index d65e79a75f3..ccc6653a49e 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.853 2013/03/26 15:10:57 schmonz Exp $
+# $NetBSD: pkglint.pl,v 1.854 2013/03/26 15:11:20 schmonz Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -649,10 +649,7 @@ sub get_vartypes_basictypes() {
my $types = {};
assert($lines, "Couldn't load pkglint.pl from $program");
foreach my $line (@$lines) {
- if ($line->text =~ m"^\s+\} elsif \(\$type eq \"(\w+)\"\) \{$") {
- # still finds "ARRAY" -- probably unintentional!
- $types->{$1} = 1;
- } elsif ($line->text =~ m"^\s+(\w+) => sub \{$") {
+ if ($line->text =~ m"^\s+(\w+) => sub \{$") {
# XXX lookup in %type_dispatch instead
$types->{$1} = 1;
}
diff --git a/pkgtools/pkglint/files/pkglint.t b/pkgtools/pkglint/files/pkglint.t
index a32c98af84f..fdeb03a64b4 100644
--- a/pkgtools/pkglint/files/pkglint.t
+++ b/pkgtools/pkglint/files/pkglint.t
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.t,v 1.7 2013/03/26 15:10:32 schmonz Exp $
+# $NetBSD: pkglint.t,v 1.8 2013/03/26 15:11:20 schmonz Exp $
#
require 'pkglint.pl'; # so we can test its internals
@@ -71,7 +71,7 @@ sub test_get_vartypes_basictypes {
my %types = %{$results[0]};
my @all_vartypes_basictypes = qw(
- ARRAY AwkCommand BrokenIn
+ AwkCommand BrokenIn
BuildlinkDepmethod BuildlinkDepth BuildlinkPackages
CFlag Category Comment
Dependency DependencyWithPath