pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Prevent internal errors when on...
details: https://anonhg.NetBSD.org/pkgsrc/rev/cf9b2a624ca4
branches: trunk
changeset: 536797:cf9b2a624ca4
user: rillig <rillig%pkgsrc.org@localhost>
date: Sat Dec 22 22:27:17 2007 +0000
description:
Prevent internal errors when one-letter variables are used. The warning
to disambiguate them is still printed.
PR: 37593
diffstat:
pkgtools/pkglint/files/pkglint.pl | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r af81cd16bbdf -r cf9b2a624ca4 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sat Dec 22 21:40:13 2007 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sat Dec 22 22:27:17 2007 +0000
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.741 2007/12/22 11:15:52 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.742 2007/12/22 22:27:17 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -1785,6 +1785,7 @@
| \`[^\`]*\` # backticks string
| \\\$\$ # an escaped dollar sign
| \\[^\$] # other escaped characters
+ | \$[\w_] # one-character make(1) variable
| \$\{[^{}]+\} # make(1) variable
| \$\([^()]+\) # make(1) variable, $(...)
| \$[/\@<^] # special make(1) variables
@@ -4223,7 +4224,7 @@
# which state we are currently.
} elsif ($rest =~ s/^\$\{(${regex_varname}|[\@])(:[^\{]+)?\}//
|| $rest =~ s/^\$\((${regex_varname}|[\@])(:[^\)]+)?\)//
- || $rest =~ s/^\$(\@)//) {
+ || $rest =~ s/^\$([\w\@])//) {
my ($varname, $mod) = ($1, $2);
if ($varname eq "\@") {
Home |
Main Index |
Thread Index |
Old Index