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.33.1.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e6680d377f97
branches:  trunk
changeset: 502265:e6680d377f97
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu Nov 03 18:49:32 2005 +0000

description:
Updated pkglint to 4.33.1.

Fixed undefined behavior when reading a file that ends in a continuation
line. Any use of ${WRKSRC}/.. is considered an error, as ${WRKSRC} is
meant to point to the top of the build directories. A proper combination
of WRKSRC, CONFIGURE_DIRS and BUILD_DIRS should be used instead. Sorted
the makevars.map file and added SUBST_CLASSES.

diffstat:

 pkgtools/pkglint/Makefile           |   4 +-
 pkgtools/pkglint/files/makevars.map |  51 ++++++++++++++++++------------------
 pkgtools/pkglint/files/pkglint.pl   |  10 ++++++-
 3 files changed, 36 insertions(+), 29 deletions(-)

diffs (121 lines):

diff -r b0bd8e02de47 -r e6680d377f97 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Thu Nov 03 18:15:47 2005 +0000
+++ b/pkgtools/pkglint/Makefile Thu Nov 03 18:49:32 2005 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.276 2005/11/03 12:35:05 rillig Exp $
+# $NetBSD: Makefile,v 1.277 2005/11/03 18:49:32 rillig Exp $
 #
 
-DISTNAME=      pkglint-4.33
+DISTNAME=      pkglint-4.33.1
 CATEGORIES=    pkgtools devel
 MASTER_SITES=  # empty
 DISTFILES=     # empty
diff -r b0bd8e02de47 -r e6680d377f97 pkgtools/pkglint/files/makevars.map
--- a/pkgtools/pkglint/files/makevars.map       Thu Nov 03 18:15:47 2005 +0000
+++ b/pkgtools/pkglint/files/makevars.map       Thu Nov 03 18:49:32 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.22 2005/11/02 20:16:02 rillig Exp $
+# $NetBSD: makevars.map,v 1.23 2005/11/03 18:49:33 rillig Exp $
 #
 
 # This file contains the guessed type of some variables, according to
@@ -43,40 +43,39 @@
 #USE_WNN4              One_Of(YES NO)
 USE_XFACE              YesNo
 
-# some variables found in package Makefiles
+# some other variables, sorted alphabetically
 
+BUILD_DEPENDS          List of Dependency
+BUILD_USES_MSGFMT      Yes
 CATEGORIES             List* of Category
-PKGREVISION            PkgRevision
+CFLAGS                 List
+CONFIGURE_ARGS         List
+CONFIGURE_ENV          List
+CPPFLAGS               List
+DEPENDS                        List of Dependency
 GNU_CONFIGURE          Yes
 HOMEPAGE               URL
+LDFLAGS                        List
+LIBS                   List
 MAINTAINER             Mail_Address
+MAKE_ENV               List
+MAKE_FLAGS             List
+MANZ                   Yes
+MASTER_SITES           List* of URL
+NO_BUILD               Yes
 NO_CHECKSUM            Yes
 NO_CONFIGURE           Yes
-NO_BUILD               Yes
-#USE_PERL5             One_Of(build run)
-USE_X11                        Yes
-MANZ                   Yes
-USE_LIBTOOL            Yes
-USE_PKGLOCALEDIR       YesNo
 NO_MTREE               Yes
-PKG_PRESERVE           Yes
 NO_PKGTOOLS_REQD_CHECK Yes
 NO_PKG_REGISTER                Yes
-BUILD_USES_MSGFMT      Yes
-
-DEPENDS                        List of Dependency
-BUILD_DEPENDS          List of Dependency
-CFLAGS                 List
-CPPFLAGS               List
-LDFLAGS                        List
-LIBS                   List
-MAKE_ENV               List
-CONFIGURE_ENV          List
-MAKE_FLAGS             List
-CONFIGURE_ARGS         List
+PKGBASE                        Readonly
+PKGREVISION            PkgRevision
+PKGVERSION             Readonly
+PKG_PRESERVE           Yes
 PLIST_SUBST            List
-MASTER_SITES           List* of URL
+SUBST_CLASSES          List
+SUBST_SED              List*
+USE_LIBTOOL            Yes
+USE_PKGLOCALEDIR       YesNo
 USE_TOOLS              List of Tool
-
-PKGVERSION             Readonly
-PKGBASE                        Readonly
+USE_X11                        Yes
diff -r b0bd8e02de47 -r e6680d377f97 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Thu Nov 03 18:15:47 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Thu Nov 03 18:49:32 2005 +0000
@@ -11,7 +11,7 @@
 # Freely redistributable.  Absolutely no warranty.
 #
 # From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp
-# $NetBSD: pkglint.pl,v 1.323 2005/11/03 12:32:07 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.324 2005/11/03 18:49:33 rillig Exp $
 #
 # This version contains lots of changes necessary for NetBSD packages
 # done by:
@@ -359,6 +359,10 @@
                }
        }
 
+       if ($lineno > $#{@{$lines}}) {
+               # The last line in the file is a continuation line
+               $lineno--;
+       }
        $lastlineno = $lines->[$lineno]->[0];
        ${$ref_lineno} = $lineno + 1;
 
@@ -1810,6 +1814,10 @@
                        $line->log_warning("Use tab (not spaces) to make indentation.");
                }
 
+               if ($text =~ qr"\$\{WRKSRC\}/\.\./") {
+                       $line->log_error("Using \"\${WRKSRC}/..\" is conceptually wrong. Use a combination of WRKSRC, CONFIGURE_DIRS and BUILD_DIRS instead.");
+               }
+
                if ($text =~ regex_varassign) {
                        my ($varname, $op, $value, $comment) = ($1, $2, $3, $4);
 



Home | Main Index | Thread Index | Old Index