pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files - Added the class PkgLint::Type.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4a473365be10
branches:  trunk
changeset: 512459:4a473365be10
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed May 10 08:17:25 2006 +0000

description:
- Added the class PkgLint::Type.
- Added the -Wacl command line option, which is disabled by default.
- Extended the type definitions in makevars.map by ACLs, which specify
  in which files the variables may be defined.
- Trailing white-space in DESCR files can be fixed automatically.
- Use of the $$ shell variable is not flagged as "strange" anymore.
- Added ACL-based checks for variable definitions.
- PKGREVISION should not be set to 0.
- Improved the diagnostics text for RESTRICTED.
- Added the types Unchecked and Version.
- Dashes are allowed in library names in wrapper reordering commands.
- More than one DISTFILES definition is allowed in the variable ordering
  check.

diffstat:

 pkgtools/pkglint/files/deprecated.map     |    6 +-
 pkgtools/pkglint/files/doc/chap.types.xml |    3 +-
 pkgtools/pkglint/files/makevars.map       |  525 +++++++++++++++--------------
 pkgtools/pkglint/files/pkglint.pl         |  243 ++++++++++---
 4 files changed, 461 insertions(+), 316 deletions(-)

diffs (truncated from 1133 to 300 lines):

diff -r f955224f996e -r 4a473365be10 pkgtools/pkglint/files/deprecated.map
--- a/pkgtools/pkglint/files/deprecated.map     Wed May 10 07:43:09 2006 +0000
+++ b/pkgtools/pkglint/files/deprecated.map     Wed May 10 08:17:25 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: deprecated.map,v 1.33 2006/04/13 21:04:00 rillig Exp $
+# $NetBSD: deprecated.map,v 1.34 2006/05/10 08:17:25 rillig Exp $
 #
 
 # This file contains names of Makefile variables and a short explanation
@@ -78,3 +78,7 @@
 RECOMMENDED            Use ABI_DEPENDS instead.
 BUILD_USES_MSGFMT      Use USE_TOOLS+=msgfmt instead.
 USE_MSGFMT_PLURALS     Use USE_TOOLS+=msgfmt instead.
+
+# May 2006
+EXTRACT_USING_PAX      Use "EXTRACT_OPTS=-t pax" instead.
+NO_EXTRACT             It doesn't exist anymore.
diff -r f955224f996e -r 4a473365be10 pkgtools/pkglint/files/doc/chap.types.xml
--- a/pkgtools/pkglint/files/doc/chap.types.xml Wed May 10 07:43:09 2006 +0000
+++ b/pkgtools/pkglint/files/doc/chap.types.xml Wed May 10 08:17:25 2006 +0000
@@ -1,4 +1,4 @@
-<!-- $NetBSD: chap.types.xml,v 1.2 2006/04/30 21:43:42 rillig Exp $ -->
+<!-- $NetBSD: chap.types.xml,v 1.3 2006/05/10 08:17:25 rillig Exp $ -->
 
 <chapter id="types">
 <title>The &pkglint; type system</title>
@@ -404,6 +404,7 @@
        <thead><row><entry>Operation</entry><entry>Description</entry></row></thead>
        <tbody>
        <row><entry>write</entry><entry>Create a variable or overwrite the value</entry></row>
+       <row><entry>colon</entry><entry>Assign using the <literal>:=</literal> operator</entry></row>
        <row><entry>append</entry><entry>Append to a list</entry></row>
        <row><entry>default</entry><entry>Provide a default value for a variable</entry></row>
        <row><entry>read</entry><entry>Use the value when executing the shell commands</entry></row>
diff -r f955224f996e -r 4a473365be10 pkgtools/pkglint/files/makevars.map
--- a/pkgtools/pkglint/files/makevars.map       Wed May 10 07:43:09 2006 +0000
+++ b/pkgtools/pkglint/files/makevars.map       Wed May 10 08:17:25 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.84 2006/05/01 20:19:04 rillig Exp $
+# $NetBSD: makevars.map,v 1.85 2006/05/10 08:17:25 rillig Exp $
 #
 
 # This file contains the guessed type of some variables, according to
@@ -26,7 +26,6 @@
 PKG_REGISTER_SHELLS    Readonly
 USE_XPKGWEDGE          Readonly
 LIBTOOLIZE_PLIST       Readonly
-EXTRACT_USING_PAX      Readonly
 SETGIDGAME             Readonly
 
 USE_CRYPTO             Readonly
@@ -34,12 +33,12 @@
 
 # some other variables, sorted alphabetically
 
-ALL_ENV                        List+ of ShellWord
+ALL_ENV                        List of ShellWord
 ALTERNATIVES_FILE      Filename
-ALTERNATIVES_SRC       List+ of Pathname
+ALTERNATIVES_SRC       List of Pathname
 APACHE_MODULE          Yes
-AUTOCONF_REQD          List+
-AUTOMAKE_OVERRIDE      List+ of Pathmask
+AUTOCONF_REQD          List of Version [m:a, c:a]
+AUTOMAKE_OVERRIDE      List of Pathmask
 BDB185_DEFAULT         Userdefined
 BDBBASE                        Readonly
 BDB_ACCEPTED           List of { db1 db2 db3 db4 }
@@ -47,86 +46,86 @@
 BDB_LIBS               Readonly
 BDB_TYPE               Readonly
 BROKEN                 Message
-BROKEN_GETTEXT_DETECTION       YesNo
-BROKEN_IN              List of BrokenIn
-BUILDLINK_ABI_DEPENDS  List of Dependency
-BUILDLINK_API_DEPENDS  List of Dependency
+BROKEN_GETTEXT_DETECTION       YesNo [m:w]
+BROKEN_IN              List of BrokenIn [m:w]
+BUILDLINK_ABI_DEPENDS  List of Dependency [b:da,m:a]           # b:d?
+BUILDLINK_API_DEPENDS  List of Dependency [b:da,m:a]           # b:d?
 BUILDLINK_CONTENTS_FILTER      List of ShellWord
 # ^^ ShellCommand
-BUILDLINK_CFLAGS       List+ of CFlag
-BUILDLINK_CPPFLAGS     List+ of CFlag
-BUILDLINK_DEPENDS      InternalList+ of Dependency
-BUILDLINK_DEPMETHOD    BuildlinkDepmethod
-BUILDLINK_DEPTH                BuildlinkDepth
-BUILDLINK_FILES                List+ of Pathmask
+BUILDLINK_CFLAGS       List of CFlag
+BUILDLINK_CPPFLAGS     List of CFlag
+BUILDLINK_DEPENDS      InternalList of Dependency [b:a]
+BUILDLINK_DEPMETHOD    BuildlinkDepmethod [b:d,m:w]
+BUILDLINK_DEPTH                BuildlinkDepth [b:c]
+BUILDLINK_FILES                List of Pathmask [b:a]
 BUILDLINK_FILES_CMD    List of ShellWord
 # ^^ ShellCommand
-BUILDLINK_INCDIRS      List of Pathname
+BUILDLINK_INCDIRS      List of Pathname [b:ad]                 # b:d?
 BUILDLINK_JAVA_PREFIX  Pathname
-BUILDLINK_LDADD                List of LdFlag
-BUILDLINK_LDFLAGS      List+ of LdFlag
-BUILDLINK_LIBDIRS      List of Pathname
-BUILDLINK_LIBS         List of LdFlag
-BUILDLINK_PACKAGES     BuildlinkPackages
-BUILDLINK_PASSTHRU_DIRS        List+ of Pathname
-BUILDLINK_PASSTHRU_RPATHDIRS   List+ of Pathname
-BUILDLINK_PKGSRCDIR    RelativePkgDir
-BUILDLINK_PREFIX       Pathname
+BUILDLINK_LDADD                List of LdFlag [builtin.mk:adw]
+BUILDLINK_LDFLAGS      List of LdFlag
+BUILDLINK_LIBDIRS      List of Pathname [b:a]
+BUILDLINK_LIBS         List of LdFlag [b:a]
+BUILDLINK_PACKAGES     BuildlinkPackages [b:ac]
+BUILDLINK_PASSTHRU_DIRS        List of Pathname [m:a,c:a,b:a,h:a]
+BUILDLINK_PASSTHRU_RPATHDIRS   List of Pathname [m:a,c:a,b:a,h:a]
+BUILDLINK_PKGSRCDIR    RelativePkgDir [b:d]
+BUILDLINK_PREFIX       Pathname [builtin.mk:w]
 BUILDLINK_RPATHDIRS    List of Pathname
-BUILDLINK_TARGETS      List+ of Identifier
-BUILDLINK_TRANSFORM    List+ of WrapperTransform
-BUILD_DEFS             List+ of Varname
-BUILD_DEPENDS          InternalList+ of DependencyWithPath
-BUILD_DIRS             List of WrksrcSubdirectory
-BUILD_ENV              List+ of ShellWord
-BUILD_TARGET           List of Identifier
+BUILDLINK_TARGETS      List of Identifier
+BUILDLINK_TRANSFORM    List of WrapperTransform [m:a,builtin.mk:a,h:a,b:a]
+BUILD_DEFS             List of Varname [m:a,c:a,o:a]
+BUILD_DEPENDS          InternalList of DependencyWithPath [c:a,m:a,o:a]
+BUILD_DIRS             List of WrksrcSubdirectory [m:aw,c:aw]
+BUILD_ENV              List of ShellWord [m:a,c:a]
+BUILD_TARGET           List of Identifier [m:aw,c:aw]
 BUILD_USES_MSGFMT      Yes
-BUILTIN_PKG            Identifier
-BUILTIN_FIND_FILES_VAR List of Varname
-BUILTIN_FIND_FILES     List of Pathname
-BUILTIN_FIND_GREP      List
-BUILTIN_FIND_LIBS      List of Pathname
+BUILTIN_PKG            Identifier [builtin.mk:c]
+BUILTIN_FIND_FILES_VAR List of Varname [builtin.mk:c]
+BUILTIN_FIND_FILES     List of Pathname [builtin.mk:c]
+BUILTIN_FIND_GREP      List of ShellWord [builtin.mk:c]
+BUILTIN_FIND_LIBS      List of Pathname [builtin.mk:c]
 BUILTIN_X11_TYPE       Readonly
 BUILTIN_X11_VERSION    Readonly
-CATEGORIES             List of Category
+CATEGORIES             List of Category [m:aw,c:aw]
 CC_VERSION             Readonly
-CC                     Readonly
-CFLAGS                 List+ of CFlag
-CHECK_BUILTIN          YesNo
-CHECK_FILES_SKIP       List of Pathmask
-CHECK_INTERPRETER_SKIP List+ of Pathmask
-CHECK_SHLIBS           YesNo
-CHECK_WRKREF_SKIP      List+ of Pathmask
-COMMENT                        Comment
-CONFIGURE_ARGS         List+ of ShellWord
-CONFIGURE_DIRS         List of WrksrcSubdirectory
-CONFIGURE_ENV          List+ of ShellWord
+CC                     ShellCommand [m:]
+CFLAGS                 List of CFlag [m:a,c:a,o:a]
+CHECK_BUILTIN          YesNo [builtin.mk:d,m:c]
+CHECK_FILES_SKIP       List of Pathmask [m:a,c:a]
+CHECK_INTERPRETER_SKIP List of Pathmask [m:a,c:a]
+CHECK_SHLIBS           YesNo [m:w]
+CHECK_WRKREF_SKIP      List of Pathmask [m:a,c:a]
+COMMENT                        Comment [m:aw,c:aw]                     # m:a?, c:a?
+CONFIGURE_ARGS         List of ShellWord [c:a,m:a,o:a,h:a,builtin.mk:a]
+CONFIGURE_DIRS         List of WrksrcSubdirectory [m:w,c:w]
+CONFIGURE_ENV          List of ShellWord [c:a,m:a,o:a,b:a]
 CONFIGURE_HAS_INFODIR  YesNo
-CONFIGURE_HAS_MANDIR   YesNo
-CONFIGURE_SCRIPT       Pathname
-CONFIG_GUESS_OVERRIDE  List+ of Pathmask
-CONFIG_STATUS_OVERRIDE List+ of Pathmask
-CONFIG_SHELL           ShellWord
-CONFIG_SUB_OVERRIDE    List+ of Pathmask
-CONFLICTS              List of Dependency
-CONF_FILES             List of ShellWord
-CONF_FILES_MODE                { 0644 0640 0600 0400 }
-CONF_FILES_PERMS       List of ShellWord
-CPPFLAGS               List+ of CFlag
-CRYPTO                 Yes
-CXX                    Readonly
-CXXFLAGS               List+ of CFlag
-DEINSTALL_FILE         Pathname
-DEINSTALL_SRC          List of Pathname
+CONFIGURE_HAS_MANDIR   YesNo [m:w]
+CONFIGURE_SCRIPT       Pathname [m:w]
+CONFIG_GUESS_OVERRIDE  List of Pathmask [m:aw,c:aw]
+CONFIG_STATUS_OVERRIDE List of Pathmask [m:aw,c:aw]
+CONFIG_SHELL           ShellWord [m:w,c:w]
+CONFIG_SUB_OVERRIDE    List of Pathmask [m:aw,c:aw]
+CONFLICTS              List of Dependency [m:aw,c:a]
+CONF_FILES             List of ShellWord [m:aw,c:a]
+CONF_FILES_MODE                { 0644 0640 0600 0400 } [m:aw,c:a]
+CONF_FILES_PERMS       List of ShellWord [m:aw,c:a]
+CPPFLAGS               List of CFlag [m:a,h:a,c:a,o:a]
+CRYPTO                 Yes [m:w]
+CXX                    Readonly [m:]
+CXXFLAGS               List of CFlag [m:a,c:a,o:a,h:a]
+DEINSTALL_FILE         Pathname [m:w]
+DEINSTALL_SRC          List of Pathname [m:w,c:w]
 DEINSTALL_TEMPLATE     List of Pathname
-DEPENDS                        InternalList+ of DependencyWithPath
-DESCR_SRC              List of Pathname
+DEPENDS                        InternalList of DependencyWithPath [c:a,m:a,o:a,b:a]
+DESCR_SRC              List of Pathname [c:dw]
 DEVOSSAUDIO            Pathname
 DEVOSSSOUND            Pathname
-DISTFILES              List of Filename
-DISTINFO_FILE          RelativePkgPath
-DISTNAME               Filename
-DIST_SUBDIR            Filename
+DISTFILES              List of Filename [m:aw,c:aw]
+DISTINFO_FILE          RelativePkgPath [m:w,c:dw]
+DISTNAME               Filename [m:w,c:aw]
+DIST_SUBDIR            Filename [m:w,c:w]
 DJB_BUILD_TARGETS      List of Identifier
 DJB_CONFIG_CMDS                List of ShellWord
 # ^^ ShellCommand, terminated by a semicolon
@@ -135,12 +134,12 @@
 DJB_BUILD_TARGETS      List of Identifier
 DJB_INSTALL_TARGETS    List of Identifier
 DJB_MAKE_TARGETS       List of Identifier
-DJB_RESTRICTED         YesNo
+DJB_RESTRICTED         YesNo [m:w]
 DJB_SLASHPACKAGE       YesNo
 DLOPEN_REQUIRE_PTHREADS        YesNo
 DL_AUTO_VARS           Yes
-DL_LIBS                        List+ of LdFlag
-EGDIR                  Pathname
+DL_LIBS                        List of LdFlag
+EGDIR                  Pathname [m:w,c:w]
 # ^^ This variable is not defined by the system, but has been established
 # as a convention.
 EMACS_BIN              Readonly
@@ -148,102 +147,103 @@
 EMACS_FLAVOR           Readonly
 EMACS_INFOPREFIX       Readonly
 EMACS_LISPPREFIX       Readonly
+EMACS_MODULES          List of Identifier [m:aw,c:aw]
 EMACS_PKGNAME_PREFIX   Readonly
 EMACS_TYPE             Userdefined
 EMACS_USE_LEIM         Yes
-EMACS_VERSIONS_ACCEPTED        List of { emacs21 emacs21nox emacs20 xemacs215 xemacs214 }
-EMACS_VERSION_REQD     List+
+EMACS_VERSIONS_ACCEPTED        List of { emacs21 emacs21nox emacs20 xemacs215 xemacs214 } [m:w]
+EMACS_VERSION_REQD     List of Version
 # ^^ of Version
-EVAL_PREFIX            InternalList of ShellWord
+EVAL_PREFIX            InternalList of ShellWord [m:a,c:a]
 # ^^ FIXME: Looks like a type mismatch.
-EXTRACT_CMD            List of ShellWord
-EXTRACT_ELEMENTS       List of Pathmask
-EXTRACT_ONLY           List of Pathname
-EXTRACT_OPTS           List of ShellWord
-EXTRACT_OPTS_BIN       List of ShellWord
-EXTRACT_OPTS_LHA       List of ShellWord
-EXTRACT_OPTS_PAX       List of ShellWord
-EXTRACT_OPTS_RAR       List of ShellWord
-EXTRACT_OPTS_TAR       List of ShellWord
-EXTRACT_OPTS_ZIP       List of ShellWord
-EXTRACT_OPTS_ZOO       List of ShellWord
-EXTRACT_SUFX           DistSuffix
-EXTRACT_USING          { gtar nbtar pax }
+EXTRACT_CMD            ShellCommand [m:w]
+EXTRACT_ELEMENTS       List of Pathmask [m:w]
+EXTRACT_ONLY           List of Pathname [m:aw]
+EXTRACT_OPTS           List of ShellWord [m:aw]
+EXTRACT_OPTS_BIN       List of ShellWord [m:aw]
+EXTRACT_OPTS_LHA       List of ShellWord [m:aw]
+EXTRACT_OPTS_PAX       List of ShellWord [m:aw]
+EXTRACT_OPTS_RAR       List of ShellWord [m:aw]
+EXTRACT_OPTS_TAR       List of ShellWord [m:aw]
+EXTRACT_OPTS_ZIP       List of ShellWord [m:aw]
+EXTRACT_OPTS_ZOO       List of ShellWord [m:aw]
+EXTRACT_SUFX           DistSuffix [c:w,m:w]
+EXTRACT_USING          { gtar nbtar pax } [m:w]
 FAMBASE                        Readonly
 FAM_ACCEPTED           List of { fam gamin }
 FAM_DEFAULT            Userdefined
 FAM_TYPE               Readonly
-FETCH_BEFORE_ARGS      List of ShellWord
-FILESDIR               RelativePkgPath
-FILES_SUBST            List+ of ShellWord
-FILES_SUBST_SED                List+ of ShellWord
-FONTS_DIRS             List+ of Pathname
-GCC_REQD               List+
-GENERATE_PLIST         List+ of ShellWord
-# ^^ List+ of Shellcommand, terminated with a semicolon
+FETCH_BEFORE_ARGS      List of ShellWord [m:aw]
+FILESDIR               RelativePkgPath [m:w,c:dw]
+FILES_SUBST            List of ShellWord [m:a,c:a]
+FILES_SUBST_SED                List of ShellWord
+FONTS_DIRS             List of Pathname [m:w]
+GCC_REQD               List of Version [h:a,m:a]
+GENERATE_PLIST         List of ShellWord [m:a,c:a]
+# ^^ List of Shellcommand, terminated with a semicolon
 GNU_ARCH               { mips }



Home | Main Index | Thread Index | Old Index