diff options
author | rillig <rillig> | 2009-07-17 04:39:33 +0000 |
---|---|---|
committer | rillig <rillig> | 2009-07-17 04:39:33 +0000 |
commit | af493105dcfbc469e6af0a7c215a9746471cf17e (patch) | |
tree | b1f451765bd5432b3bd2b85e2d107bd3dd499974 /pkgtools | |
parent | ae193d75b2c047cb3117b2d8914da8bc8d8501bb (diff) | |
download | pkgsrc-af493105dcfbc469e6af0a7c215a9746471cf17e.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.pl | 7 |
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. |