summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2009-07-17 04:39:33 +0000
committerrillig <rillig@pkgsrc.org>2009-07-17 04:39:33 +0000
commit2132a6a60b9101bf9e58fcbf21b08838b9f51c03 (patch)
treeb1f451765bd5432b3bd2b85e2d107bd3dd499974 /pkgtools
parent9711e0d950137425aa91e6e7aeb8d44ffc7f8a6a (diff)
downloadpkgsrc-2132a6a60b9101bf9e58fcbf21b08838b9f51c03.tar.gz
Variables that are defined by the package may be used as shell commands.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 9deb79ed14c..52b78cabc4a 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.813 2009/06/13 06:30:25 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.814 2009/07/17 04:39:33 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -4483,6 +4483,11 @@ sub checkline_mk_shelltext($$) {
} elsif ($shellword =~ m"^\$\{([\w_]+)\}$" && defined($type = get_variable_type($line, $1)) && $type->basic_type eq "ShellCommand") {
checkline_mk_shellcmd_use($line, $shellword);
+ } elsif ($shellword =~ m"^\$\{(\w+)\}$" && defined($pkgctx_vardef) && exists($pkgctx_vardef->{$1})) {
+ # When the package author has explicitly
+ # defined a command variable, assume it
+ # to be valid.
+
} elsif ($shellword =~ m"^(?:\(|\)|:|;|;;|&&|\|\||\{|\}|break|case|cd|continue|do|done|elif|else|esac|eval|exec|exit|export|fi|for|if|read|set|shift|then|umask|unset|while)$") {
# Shell builtins are fine.