pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Enumerations don't need the :Q ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/501bc0966a6f
branches:  trunk
changeset: 513940:501bc0966a6f
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Tue Jun 06 07:04:56 2006 +0000

description:
Enumerations don't need the :Q operator.

diffstat:

 pkgtools/pkglint/files/makevars.map |  4 ++--
 pkgtools/pkglint/files/pkglint.pl   |  6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r 0f3c46c1520a -r 501bc0966a6f pkgtools/pkglint/files/makevars.map
--- a/pkgtools/pkglint/files/makevars.map       Tue Jun 06 06:48:16 2006 +0000
+++ b/pkgtools/pkglint/files/makevars.map       Tue Jun 06 07:04:56 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.105 2006/06/06 06:48:16 rillig Exp $
+# $NetBSD: makevars.map,v 1.106 2006/06/06 07:04:56 rillig Exp $
 #
 
 # This file contains the guessed type of some variables, according to
@@ -420,7 +420,7 @@
 PKGCONFIG_OVERRIDE     List of Pathmask [m:as,c:a]
 PKGDIR                 RelativePkgDir
 PKGNAME                        PkgName [m:s,c:s,Makefile.*:ds,*:ds]
-PKGNAME_NOREV          Unchecked []
+PKGNAME_NOREV          PkgName []
 PKGREPOSITORY          Unchecked []
 PKGREVISION            PkgRevision [m:s]
 PKGTOOLS_ENV           List of ShellWord
diff -r 0f3c46c1520a -r 501bc0966a6f pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Tue Jun 06 06:48:16 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Tue Jun 06 07:04:56 2006 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.604 2006/06/06 06:48:16 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.605 2006/06/06 07:04:56 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -2645,7 +2645,9 @@
                return dont_know;
        }
 
-       if ($type->kind_of_list == LK_NONE && exists(safe_types->{$type->basic_type})) {
+       # Variables of certain predefined types, as well as all
+       # enumerations, are expected to not require the :Q operator.
+       if ($type->kind_of_list == LK_NONE && (ref($type->basic_type) eq "HASH" || exists(safe_types->{$type->basic_type}))) {
                return doesnt_matter;
        }
 



Home | Main Index | Thread Index | Old Index