pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files - PKGNAME may appear in double ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cf055fc445ac
branches:  trunk
changeset: 507910:cf055fc445ac
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat Feb 11 11:53:21 2006 +0000

description:
- PKGNAME may appear in double quoted shell strings.

diffstat:

 pkgtools/pkglint/files/pkglint.pl |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 7fee99ed8769 -r cf055fc445ac pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sat Feb 11 11:51:24 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sat Feb 11 11:53:21 2006 +0000
@@ -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 @@
                        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(



Home | Main Index | Thread Index | Old Index