summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2006-06-09 08:53:28 +0000
committerrillig <rillig>2006-06-09 08:53:28 +0000
commit7dcf631c25ce80621738d1a20b813c7efe9b0583 (patch)
tree736c80be3c7e9bf8a55bb09769fe24a0ecba49b0 /pkgtools
parent673afb150470627ea70fa06891d12f236b7836c1 (diff)
downloadpkgsrc-7dcf631c25ce80621738d1a20b813c7efe9b0583.tar.gz
In the SCST_COND state, a shell command is expected, so check here for
known and unknown commands, too.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 0f8c612a50c..6b46cf7c6ed 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.616 2006/06/08 18:22:46 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.617 2006/06/09 08:53:28 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -3436,7 +3436,7 @@ sub checkline_mk_shelltext($$) {
# and the symbol on the "input tape".
#
- if ($state == SCST_START && exists($vartools->{$shellword})) {
+ if (($state == SCST_START || $state == SCST_COND) && exists($vartools->{$shellword})) {
my $addition = "";
if (!exists(get_predefined_vartool_names()->{$shellword})) {
@@ -3447,7 +3447,7 @@ sub checkline_mk_shelltext($$) {
$line->log_warning("Direct use of tool \"${shellword}\". Please use \$\{$vartools->{$shellword}\} instead${addition}.");
}
- if ($state == SCST_START) {
+ if ($state == SCST_START || $state == SCST_COND) {
if (exists(forbidden_commands->{$shellword})) {
$line->log_error("${shellword} is forbidden and must not be used.");