summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorabs <abs>2000-09-21 10:28:44 +0000
committerabs <abs>2000-09-21 10:28:44 +0000
commitb3e0afec974177898213d40e6f77fdd2e680e4d6 (patch)
tree0145953c442316d5e07d416e5d6477476ac1baf1 /pkgtools
parentd1d244b4afdca2306948243ea5131dc2a2658778 (diff)
downloadpkgsrc-b3e0afec974177898213d40e6f77fdd2e680e4d6.tar.gz
pkglint:
lintpkgsrc - fix :S modifier behaviour - broken in last commit
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/Makefile4
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl16
2 files changed, 7 insertions, 13 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index 0deb3e98121..1a468e044e5 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.60 2000/09/20 06:39:27 abs Exp $
+# $NetBSD: Makefile,v 1.61 2000/09/21 10:28:44 abs Exp $
#
-DISTNAME= pkglint-2.22
+DISTNAME= pkglint-2.23
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl
index d70a9224abc..0f6a8648ffc 100755
--- a/pkgtools/pkglint/files/lintpkgsrc.pl
+++ b/pkgtools/pkglint/files/lintpkgsrc.pl
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
-# $NetBSD: lintpkgsrc.pl,v 1.31 2000/09/20 06:39:28 abs Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.32 2000/09/21 10:28:44 abs Exp $
# Written by David Brownlee <abs@netbsd.org>.
#
@@ -636,16 +636,10 @@ sub parse_makefile_vars
my($how, $from, $to, $global) = ($1, $2, $3, $4);
debug("substitute: $subvar, $how, $from, $to, $global\n");
- if ($how eq 'S')
- {
- if (($_ = index($result, $from)) != -1)
- { substr($result, $_, length($from), $to); }
- }
- else
- {
- $to =~ s/\\(\d)/\$$1/g; # Change \1 etc to $1
- eval "\$result =~ s/$from/$to/$global";
- }
+ if ($how eq 'S') # Limited substitution - keep ^ and $
+ { $from =~ s/[?.{}\]\[*+]/\$1/g; }
+ $to =~ s/\\(\d)/\$$1/g; # Change \1 etc to $1
+ eval "\$result =~ s/$from/$to/$global";
}
$vars{$key} = $left . $result . $right;
$loop = 1;