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.66.
details: https://anonhg.NetBSD.org/pkgsrc/rev/5a4269172f10
branches: trunk
changeset: 515378:5a4269172f10
user: rillig <rillig%pkgsrc.org@localhost>
date: Sun Jul 02 09:47:17 2006 +0000
description:
Updated pkglint to 4.66.
This change includes all the things I thought of during the freeze of
2006Q2.
Some variables have disappeared from pkgsrc without notice. Marked them
deprecated to help the package authors at least a bit.
Renamed some ACL abbreviations in makevars.map and adjusted the variable
definitions.
Added the command line options -Dtrace, -Dunchecked and -Dunused.
Some variables may contain unexpected white-space and therefore should
not be used in .for loops.
The -Dmisc option replaces the --verbose option (and the log_info
subroutine), which does not exist any longer. This eliminates all
instances of "OK:" from the output, which I didn't like from the
beginning. The -Dmisc option also takes over many warnings that have
been issued by --debug before.
Improved the check for absolute pathnames. Especially, everything that
follows ${DESTDIR} or $(DESTDIR) in a Makefile is considered an absolute
pathname. This reveals many wrong uses of DESTDIR (as defined by the GNU
coding standards), for example $(DESTDIR)/$(prefix), which should be
$(DESTDIR)$(prefix) instead.
Almost every use of a make(1) variable is checked for spelling mistakes.
Before, only the definitions of variables have been checked.
Restricted the use of variables to specific files, which are defined in
makevars.map. This catches especially buildlink3.mk files with
unexpected side effects.
In shell commands, neither "echo" nor "echo -n" or "${ECHO} -n" should
be used. Since the INSTALL_*_DIR commands can only handle one directory
at a time, suggest to use INSTALLATION_DIRS instead.
Greatly improved the checks for dependency specifications, especially to
find foo-*, which should rather be foo-[0-9]*.
Fixed the incorrect handling of LICENSE_FILE (now using $line->text
instead of $line).
Improved the wording of the "plural names" warnings, so that for known
variables it is "The += operator should only be used with lists." now.
In buildlink3.mk files the uppercase and lowercase names of the package
should correspond with the package name. This catches many
copy-and-paste mistakes. Fixed many null pointer exceptions as well. In
addition, every buildlink3.mk file needs a definition of
BUILDLINK_API_DEPENDS.
In patch files, absolute pathnames and unportable macro names are
checked not only in added lines, but also in the context lines.
In the pkgsrc root directory and the category directories, the Makefiles
are checked like every other Makefile, too.
Fixed the place where the global variables for the package context are
defined and later undefined.
Variables that are mentioned in EVAL_PREFIX may be used in the current
file and are not flagged as "used but not defined".
When parsing shell words in Makefiles, recognize $<, $@, $^ and $/.
(The latter is used extensively by openoffice to represent a directory
separator.)
Fixed some minor bugs:
* $makevar had been defined unintentionally by using the -> operator.
diffstat:
pkgtools/pkglint/Makefile | 4 +-
pkgtools/pkglint/TODO | 7 +-
pkgtools/pkglint/files/deprecated.map | 10 +-
pkgtools/pkglint/files/doc/chap.types.xml | 15 +-
pkgtools/pkglint/files/makevars.map | 646 +++++++++-------
pkgtools/pkglint/files/pkglint.0 | 12 +-
pkgtools/pkglint/files/pkglint.1 | 27 +-
pkgtools/pkglint/files/pkglint.pl | 1090 +++++++++++++++++++++-------
8 files changed, 1201 insertions(+), 610 deletions(-)
diffs (truncated from 3577 to 300 lines):
diff -r c1b7867dbdb4 -r 5a4269172f10 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Sun Jul 02 09:45:23 2006 +0000
+++ b/pkgtools/pkglint/Makefile Sun Jul 02 09:47:17 2006 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.344 2006/06/22 07:53:09 rillig Exp $
+# $NetBSD: Makefile,v 1.345 2006/07/02 09:47:17 rillig Exp $
#
-DISTNAME= pkglint-4.65
+DISTNAME= pkglint-4.66
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
diff -r c1b7867dbdb4 -r 5a4269172f10 pkgtools/pkglint/TODO
--- a/pkgtools/pkglint/TODO Sun Jul 02 09:45:23 2006 +0000
+++ b/pkgtools/pkglint/TODO Sun Jul 02 09:47:17 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: TODO,v 1.49 2006/06/08 15:14:22 rillig Exp $
+$NetBSD: TODO,v 1.50 2006/07/02 09:47:17 rillig Exp $
Please add your own entries at the bottom of this file. If possible,
include the name of an example package where a warning should occur.
@@ -25,6 +25,9 @@
warnings. For example, checkline_foo() may need to know what has
happened in the file before that line.
* Add checks for binary packages. See Debian/lintian for ideas.
-* Check that USE_LIBTOOL=yes, when the PLIST contains *.la.
* Of the user-defined variables, some may be used at load-time and some
don't. Find out how pkglint can distinguish them.
+* Make sure that no variable is modified at load-time after it has been
+ used once. This should at least flag BUILD_DEFS in bsd.pkg.mk.
+* Implement unescape_shellword, which is required for the type check for
+ SedCommand.
diff -r c1b7867dbdb4 -r 5a4269172f10 pkgtools/pkglint/files/deprecated.map
--- a/pkgtools/pkglint/files/deprecated.map Sun Jul 02 09:45:23 2006 +0000
+++ b/pkgtools/pkglint/files/deprecated.map Sun Jul 02 09:47:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: deprecated.map,v 1.39 2006/06/18 08:42:16 rillig Exp $
+# $NetBSD: deprecated.map,v 1.40 2006/07/02 09:47:17 rillig Exp $
#
# This file contains names of Makefile variables and a short explanation
@@ -6,6 +6,9 @@
# if the explanation changes, in which case the new explanation should
# be added to the current date.
+# December 2003
+FIX_RPATH It has been removed from pkgsrc in 2003.
+
# May 2005
ALL_TARGET Use BUILD_TARGET instead.
DIGEST_FILE Use DISTINFO_FILE instead.
@@ -93,3 +96,8 @@
DEINSTALL_TEMPLATE Use DEINSTALL_TEMPLATES instead.
INSTALL_TEMPLATE Use INSTALL_TEMPLATES instead.
HEADER_TEMPLATE Use HEADER_TEMPLATES instead.
+_REPLACE.* Use REPLACE.* instead.
+_REPLACE_FILES.* Use REPLACE_FILES.* instead.
+MESSAGE Use MESSAGE_SRC instead.
+INSTALL_FILE It may only be used internally by pkgsrc.
+DEINSTALL_FILE It may only be used internally by pkgsrc.
diff -r c1b7867dbdb4 -r 5a4269172f10 pkgtools/pkglint/files/doc/chap.types.xml
--- a/pkgtools/pkglint/files/doc/chap.types.xml Sun Jul 02 09:45:23 2006 +0000
+++ b/pkgtools/pkglint/files/doc/chap.types.xml Sun Jul 02 09:47:17 2006 +0000
@@ -1,4 +1,4 @@
-<!-- $NetBSD: chap.types.xml,v 1.12 2006/06/30 12:46:30 rillig Exp $ -->
+<!-- $NetBSD: chap.types.xml,v 1.13 2006/07/02 09:47:17 rillig Exp $ -->
<chapter id="types">
<title>The &pkglint; type system</title>
@@ -71,10 +71,9 @@
<xref linkend="types.predefined"/> for the list of predefined
types.</para>
- <para>Enumeration types are defined by writing a
- <literal>{</literal>, followed by the enumeration items,
- followed by a <literal>}</literal>. The enumeration items are
- separated by space characters.</para>
+ <para>An expression of an enumeration type may have either of
+ the enumeration-items as a value. It may not reference other
+ variables.</para>
<para>A list type can be constructed from a predefined type or
an enumeration. It is not possible to construct lists of lists,
@@ -486,7 +485,10 @@
</variablelist>
</sect1>
-<sect1 id="types.kinds">
+<sect1 id="types.future">
+<title>Future directions</title>
+
+<sect2 id="types.kinds">
<title>Different interpretation of the same data types</title>
<para>As explained above, there are internal lists and external
@@ -532,5 +534,6 @@
<literal>=</literal> operator for the first of the
assignments.</para>
+</sect2>
</sect1>
</chapter>
diff -r c1b7867dbdb4 -r 5a4269172f10 pkgtools/pkglint/files/makevars.map
--- a/pkgtools/pkglint/files/makevars.map Sun Jul 02 09:45:23 2006 +0000
+++ b/pkgtools/pkglint/files/makevars.map Sun Jul 02 09:47:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.121 2006/06/18 08:42:16 rillig Exp $
+# $NetBSD: makevars.map,v 1.122 2006/07/02 09:47:17 rillig Exp $
#
# This file contains the guessed type of some variables, according to
@@ -19,143 +19,152 @@
# ``The pkglint type system'' in the pkglint developer documentation.
#
-# A list may be appended to in all "normal" Makefile fragments. This
-# excludes buildlink3.mk and builtin.mk, since they are very special-
-# purpose. Because at the beginning, all lists are empty, in the
+# A package-defined variable may be set in Makefile, Makefile.common or
+# options.mk, since these are commonly used in pkgsrc. Due to the
+# special nature of buildlink3.mk and builtin.mk files, these files may
+# not define those variables. All other .mk files may, allowing for
+# application.mk or similar helper files.
+acl package = [m:su, c:dsu, b:, builtin.mk:, *.mk:dsu]
+
+# A package_list may be appended to in all "normal" Makefile fragments.
+# This excludes buildlink3.mk and builtin.mk, since they are very
+# special-purpose. Because at the beginning, all lists are empty, in the
# primary Makefile a direct assignment may be used instead of appending.
# Since Makefile.common files are usually used by packages that know
# what they are doing, they may set variables directly, too. This rule
# can be removed to show a lot of possible problems in pkgsrc.
-acl list = [m:as, c:as, b:, builtin.mk:, *.mk:a]
+acl package_list = [m:asu, c:asu, b:, builtin.mk:, *.mk:au]
acl bl_list = [b:a, builtin.mk:a]
-# A simple value is similar to $list above, just without allowing to
-# append to it.
-acl simple = [m:s, c:ds, b:, builtin.mk:, *.mk:ds]
-
# A user-defined or system-defined variable must not be set by any
# package file. It also must not be used in buildlink3.mk and
# builtin.mk files or at load-time, since the system/user preferences
# may not have been loaded when these files are included.
acl user = [b:, builtin.mk:, *:u]
-acl system = [b:, builtin.mk:, *:u]
+acl system = [b:, builtin.mk:u, *:u]
acl cmdline = [b:, builtin.mk:, *:pu]
# The following variables are taken from mk/defaults/mk.conf, 1.118
-ALLOW_VULNERABLE_PACKAGES Yes [*:]
-MANINSTALL List of { maninstall catinstall } [*:]
-MANZ Yes [*:]
-GZIP List of ShellWord [*:]
-MKCRYPTO YesNo [*:]
-OBJHOSTNAME Yes [*:]
-OBJMACHINE Yes [*:]
-PKG_SUFX Filename [*:]
-PKGSRC_LOCKTYPE { none sleep once } [*:]
-PKGSRC_SLEEPSECS Integer [*:]
-USETBL Yes [*:]
-ABI { 32 64 } [*:]
-PKG_DEVELOPER Yes [*:]
-USE_ABI_DEPENDS YesNo [*:]
-PKG_REGISTER_SHELLS { YES NO } [*:]
-PKGSRC_COMPILER List of { ccc ccache distcc f2c icc ido gcc mipspro mipspro-ucode sunpro xlc } [*:]
-PKGSRC_MESSAGE_RECIPIENTS List of Mail_Address [*:]
-PKGSRC_SHOW_BUILD_DEFS YesNo [*:]
-PKGSRC_SHOW_PATCH_ERRORMSG YesNo [*:]
-PKGSRC_RUN_TEST YesNo [*:]
-PREFER_PKGSRC List of PkgBase [*:]
-PREFER_NATIVE List of PkgBase [*:]
-PREFER_NATIVE_PTHREADS YesNo [*:]
-LOCALBASE Pathname [*:]
-CROSSBASE Pathname [*:]
-VARBASE Pathname [*:]
-X11_TYPE { native XFree86 xorg }
-X11BASE Pathname [*:]
-MOTIFBASE Pathname [*:]
-PKGINFODIR Pathname [*:]
-PKGMANDIR Pathname [*:]
-USE_XPKGWEDGE YesNo [*:]
-BSDSRCDIR Pathname [*:]
-BSDXSRCDIR Pathname [*:]
-DISTDIR Pathname [*:]
-DIST_PATH Pathlist [*:]
-DEFAULT_VIEW Unchecked [*:]
-FETCH_CMD ShellCommand [*:]
-FETCH_RESUME_ARGS List of ShellWord [*:]
-FETCH_OUTPUT_ARGS List of ShellWord [*:]
-LIBTOOLIZE_PLIST YesNo [*:]
-PKG_INSTALLATION_PREFS List of { overwrite pkgviews } [*:]
-PKG_RESUME_TRANSFERS YesNo [*:]
-PKG_SYSCONFBASE Pathname [*:]
-RCD_SCRIPTS_DIR Pathname [*:]
-PACKAGES Pathname [*:]
-PKGVULNDIR Pathname [*:]
-PASSIVE_FETCH Yes [*:]
-PATCH_FUZZ_FACTOR { -F0 -F1 -F2 -F3 } [*:]
-ACCEPTABLE_LICENSES List of Identifier [*:]
-SPECIFIC_PKGS Yes [*:]
-SITE_SPECIFIC_PKGS List of PkgPath [*:]
-HOST_SPECIFIC_PKGS List of PkgPath [*:]
-GROUP_SPECIFIC_PKGS List of PkgPath [*:]
-USER_SPECIFIC_PKGS List of PkgPath [*:]
-EXTRACT_USING { gtar nbtar pax } [*:]
-FAILOVER_FETCH Yes [*:]
-MASTER_SORT List of Unchecked [*:]
-MASTER_SORT_REGEX List of Unchecked [*:]
-PATCH_DEBUG Yes [*:]
-PKG_FC ShellCommand [*:]
-IMAKE ShellCommand [*:]
-IMAKEOPTS List of ShellWord [*:]
-PRE_ROOT_CMD ShellCommand [*:]
-SETGIDGAME YesNo [*:]
-SU_CMD ShellCommand [*:]
-SU_CMD_PATH_APPEND Pathlist [*:]
-FATAL_OBJECT_FMT_SKEW YesNo [*:]
-WARN_NO_OBJECT_FMT YesNo [*:]
-SMART_MESSAGES Yes [*:]
-BINPKG_SITES List of URL [*:]
-BIN_INSTALL_FLAG List of ShellWord [*:]
-LOCALPATCHES Pathname [*:]
+ALLOW_VULNERABLE_PACKAGES Yes [$user]
+MANINSTALL List of { maninstall catinstall } [$user]
+MANZ Yes [$user]
+GZIP List of ShellWord [$user]
+MKCRYPTO YesNo [$user]
+OBJHOSTNAME Yes [$user]
+OBJMACHINE Yes [$user]
+PKG_SUFX Filename [$user]
+PKGSRC_LOCKTYPE { none sleep once } [$user]
+PKGSRC_SLEEPSECS Integer [$user]
+USETBL Yes [$user]
+ABI { 32 64 } [$user]
+PKG_DEVELOPER Yes [$user]
+USE_ABI_DEPENDS YesNo [$user]
+PKG_REGISTER_SHELLS { YES NO } [$user]
+PKGSRC_COMPILER List of { ccc ccache distcc f2c icc ido gcc mipspro mipspro-ucode sunpro xlc } [$user]
+PKGSRC_MESSAGE_RECIPIENTS List of Mail_Address [$user]
+PKGSRC_SHOW_BUILD_DEFS YesNo [$user]
+PKGSRC_SHOW_PATCH_ERRORMSG YesNo [$user]
+PKGSRC_RUN_TEST YesNo [$user]
+PREFER_PKGSRC List of Identifier [$user]
+PREFER_NATIVE List of Identifier [$user]
+PREFER_NATIVE_PTHREADS YesNo [$user]
+LOCALBASE Pathname [$user]
+CROSSBASE Pathname [$user]
+VARBASE Pathname [$user]
+X11_TYPE { native XFree86 xorg } [$user]
+X11BASE Pathname [$user]
+MOTIFBASE Pathname [$user]
+PKGINFODIR Pathname [$user]
+PKGMANDIR Pathname [$user]
+USE_XPKGWEDGE YesNo [$user]
+BSDSRCDIR Pathname [$user]
+BSDXSRCDIR Pathname [$user]
+DISTDIR Pathname [$user]
+DIST_PATH Pathlist [$user]
+DEFAULT_VIEW Unchecked [$user]
+FETCH_CMD ShellCommand [$user]
+FETCH_RESUME_ARGS List of ShellWord [$user]
+FETCH_OUTPUT_ARGS List of ShellWord [$user]
+LIBTOOLIZE_PLIST YesNo [$user]
+PKG_INSTALLATION_PREFS List of { overwrite pkgviews } [$user]
+PKG_RESUME_TRANSFERS YesNo [$user]
+PKG_SYSCONFBASE Pathname [$user]
+RCD_SCRIPTS_DIR Pathname [$user]
+PACKAGES Pathname [$user]
+PKGVULNDIR Pathname [$user]
+PASSIVE_FETCH Yes [$user]
+PATCH_FUZZ_FACTOR { -F0 -F1 -F2 -F3 } [$user]
+ACCEPTABLE_LICENSES List of Identifier [$user]
+SPECIFIC_PKGS Yes [$user]
+SITE_SPECIFIC_PKGS List of PkgPath [$user]
+HOST_SPECIFIC_PKGS List of PkgPath [$user]
+GROUP_SPECIFIC_PKGS List of PkgPath [$user]
+USER_SPECIFIC_PKGS List of PkgPath [$user]
+EXTRACT_USING { gtar nbtar pax } [$user]
+FAILOVER_FETCH Yes [$user]
+MASTER_SORT List of Unchecked [$user]
+MASTER_SORT_REGEX List of Unchecked [$user]
+PATCH_DEBUG Yes [$user]
+PKG_FC ShellCommand [$user]
+IMAKE ShellCommand [$user]
+IMAKEOPTS List of ShellWord [$user]
+PRE_ROOT_CMD ShellCommand [$user]
+SETGIDGAME YesNo [$user]
+SU_CMD ShellCommand [$user]
+SU_CMD_PATH_APPEND Pathlist [$user]
+FATAL_OBJECT_FMT_SKEW YesNo [$user]
+WARN_NO_OBJECT_FMT YesNo [$user]
+SMART_MESSAGES Yes [$user]
+BINPKG_SITES List of URL [$user]
+BIN_INSTALL_FLAG List of ShellWord [$user]
+LOCALPATCHES Pathname [$user]
# some other variables, sorted alphabetically
Home |
Main Index |
Thread Index |
Old Index