diff options
author | rillig <rillig> | 2005-11-03 18:49:32 +0000 |
---|---|---|
committer | rillig <rillig> | 2005-11-03 18:49:32 +0000 |
commit | 381df409d86acf05e231f71188a90de003e94a35 (patch) | |
tree | 1e4f0c39bf97dae9b608a4ede0564727533bad86 /pkgtools | |
parent | 03855537d14ac43551ff42a98ff25ef9f938a2b3 (diff) | |
download | pkgsrc-381df409d86acf05e231f71188a90de003e94a35.tar.gz |
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 (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/pkglint/files/makevars.map | 51 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 10 |
3 files changed, 36 insertions, 29 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index 0ac9580960c..1beca6bc301 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -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 --git a/pkgtools/pkglint/files/makevars.map b/pkgtools/pkglint/files/makevars.map index e3de3c7e93e..cfd8ef75c96 100644 --- a/pkgtools/pkglint/files/makevars.map +++ b/pkgtools/pkglint/files/makevars.map @@ -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_OSS Yes #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 --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index e3fd496f079..d41b5257cc3 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -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 @@ sub get_logical_line($$$) { } } + 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 @@ sub checklines_package_Makefile($) { $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); |