diff options
author | rillig <rillig@pkgsrc.org> | 2006-02-11 11:53:21 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-02-11 11:53:21 +0000 |
commit | 291e1a91993fd8ad289596a17ebdced6ed3335b6 (patch) | |
tree | 78872936a096b6fceb5af641e13b094bb2f7f1d1 /pkgtools | |
parent | 3a23e9bdd9bb158eb30144a12bd7cf877a782797 (diff) | |
download | pkgsrc-291e1a91993fd8ad289596a17ebdced6ed3335b6.tar.gz |
- PKGNAME may appear in double quoted shell strings.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 39bd2f30666..aeb5a78153c 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.506 2006/02/10 12:49:22 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.507 2006/02/11 11:53:21 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -2317,9 +2317,12 @@ sub checkline_mk_shellword($$$) { if ($state == SWST_PLAIN && defined($mod) && $mod =~ qr":Q$") { # Fine. - } elsif ($state == SWST_SQUOT && $varname =~ qr"(?:DIRS?|FILES?|PATH|^PREFIX|^LOCALBASE|^PKGNAME)$") { + } elsif ($state == SWST_SQUOT && $varname =~ qr"^(?:.*DIRS?|.*FILES?|.*PATH|PREFIX|LOCALBASE|PKGNAME)$") { # Fine, too. + } elsif ($state == SWST_DQUOT && $varname =~ qr"^(?:PKGNAME)$") { + # Some variables may even be used in double quotes. + } elsif ($state == SWST_DQUOT && defined($mod) && $mod =~ qr":Q$") { $line->log_warning("Please don't use the :Q operator in double quotes."); $line->explain( |