pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint Updated pkglint to 4.88.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c945ac4e77e7
branches:  trunk
changeset: 548155:c945ac4e77e7
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu Oct 09 16:19:23 2008 +0000

description:
Updated pkglint to 4.88.

Changes since 4.87:
- Added support for PLIST_VARS and PLIST.*, which had been added in April.
  That's a long time ago ...

diffstat:

 pkgtools/pkglint/Makefile           |   4 ++--
 pkgtools/pkglint/files/makevars.map |   4 +++-
 pkgtools/pkglint/files/pkglint.pl   |  15 ++++++++++++++-
 3 files changed, 19 insertions(+), 4 deletions(-)

diffs (97 lines):

diff -r 9767cab88320 -r c945ac4e77e7 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Thu Oct 09 16:01:51 2008 +0000
+++ b/pkgtools/pkglint/Makefile Thu Oct 09 16:19:23 2008 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.376 2008/08/30 06:54:10 rillig Exp $
+# $NetBSD: Makefile,v 1.377 2008/10/09 16:19:23 rillig Exp $
 #
 
 # Please don't increase the version number if you are not rillig.
-DISTNAME=      pkglint-4.87
+DISTNAME=      pkglint-4.88
 CATEGORIES=    pkgtools
 MASTER_SITES=  # none
 DISTFILES=     # none
diff -r 9767cab88320 -r c945ac4e77e7 pkgtools/pkglint/files/makevars.map
--- a/pkgtools/pkglint/files/makevars.map       Thu Oct 09 16:01:51 2008 +0000
+++ b/pkgtools/pkglint/files/makevars.map       Thu Oct 09 16:19:23 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.184 2008/08/31 21:03:16 rillig Exp $
+# $NetBSD: makevars.map,v 1.185 2008/10/09 16:19:24 rillig Exp $
 #
 
 # This file contains the guessed type of some variables, according to
@@ -593,6 +593,8 @@
 PKG_USERS              List of ShellWord [m:as]
 PKG_USERS_VARS         List of Varname [$package]
 PKG_USE_KERBEROS       Yes [m:s,c:s]
+#PLIST.*               # has special handling code
+PLIST_VARS             List of Identifier [$package_list]
 PLIST_SRC              List of RelativePkgPath [$package_list]
 PLIST_SUBST            List of ShellWord [$package_list]
 PLIST_TYPE             { dynamic static }
diff -r 9767cab88320 -r c945ac4e77e7 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Thu Oct 09 16:01:51 2008 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Thu Oct 09 16:19:23 2008 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.773 2008/09/16 14:24:25 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.774 2008/10/09 16:19:24 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -1855,6 +1855,7 @@
 my $mkctx_build_defs;          # Set of variables that are registered in
                                # BUILD_DEFS, to assure that all user-defined
                                # variables are added to it.
+my $mkctx_plist_vars;          # The same for PLIST_VARS.
 my $mkctx_tools;               # Set of tools that are declared to be used.
 
 my @todo_items;                        # The list of directory entries that still need
@@ -3228,6 +3229,7 @@
                : ($varname =~ qr"_ARGS$") ? PkgLint::Type->new(LK_EXTERNAL, "ShellWord", allow_runtime, GUESSED)
                : ($varname =~ qr"_(?:C|CPP|CXX|LD|)FLAGS$") ? PkgLint::Type->new(LK_EXTERNAL, "ShellWord", allow_runtime, GUESSED)
                : ($varname =~ qr"_MK$") ? PkgLint::Type->new(LK_NONE, "Unchecked", allow_all, GUESSED)
+               : ($varname =~ qr"^PLIST.") ? PkgLint::Type->new(LK_NONE, "Yes", allow_all, GUESSED)
                : undef;
 
        if (defined($type)) {
@@ -4066,6 +4068,9 @@
        } elsif (defined($mkctx_for_variables) && exists($mkctx_for_variables->{$varname})) {
                # Variables defined in .for loops are also ok.
 
+       } elsif (defined($mkctx_plist_vars) && exists($mkctx_plist_vars->{$varname})) {
+               # PLIST variables are also ok.
+
        } else {
                $opt_warn_extra and $line->log_warning("${varname} is used but not defined. Spelling mistake?");
        }
@@ -6220,6 +6225,7 @@
        $mkctx_for_variables = {};
        $mkctx_vardef = {};
        $mkctx_build_defs = {};
+       $mkctx_plist_vars = {};
        $mkctx_tools = {%{get_predefined_tool_names()}};
        $mkctx_varuse = {};
 
@@ -6246,6 +6252,12 @@
                                $opt_debug_misc and $line->log_debug("${varname} is added to BUILD_DEFS.");
                        }
 
+               } elsif ($varcanon eq "PLIST_VARS") {
+                       foreach my $id (split(qr"\s+", $line->get("value"))) {
+                               $mkctx_plist_vars->{"PLIST.$id"} = true;
+                               $opt_debug_misc and $line->log_debug("PLIST.${id} is added to PLIST_VARS.");
+                       }
+
                } elsif ($varcanon eq "USE_TOOLS") {
                        foreach my $tool (split(qr"\s+", $line->get("value"))) {
                                $mkctx_tools->{$tool} = true;
@@ -6510,6 +6522,7 @@
        $mkctx_target = undef;
        $mkctx_vardef = undef;
        $mkctx_build_defs = undef;
+       $mkctx_plist_vars = undef;
        $mkctx_tools = undef;
        $mkctx_varuse = undef;
 }



Home | Main Index | Thread Index | Old Index