Updated pkglint to 4.27.

Added a warning that ${PKGNAME} and ${PKGVERSION} should not be used in
some other variables, as they may contain the PKGREVISION.
This commit is contained in:
rillig 2005-10-13 00:23:53 +00:00
parent ddd180473b
commit 23a0f74cf2
3 changed files with 16 additions and 4 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: CHANGES,v 1.11445 2005/10/12 22:27:49 wiz Exp $
$NetBSD: CHANGES,v 1.11446 2005/10/13 00:24:41 rillig Exp $
Changes to the packages collection and infrastructure in 2005:
@ -4473,3 +4473,4 @@ Changes to the packages collection and infrastructure in 2005:
Updated meta-pkgs/gnome-base to 2.12.1 [jmmv 2005-10-12]
Added misc/kmemaid version 0.4.7.0 [wiz 2005-10-12]
Updated audio/icecast to 2.3.0 [wiz 2005-10-12]
Updated pkgtools/pkglint to 4.27 [rillig 2005-10-13]

View file

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.262 2005/10/09 18:24:11 rillig Exp $
# $NetBSD: Makefile,v 1.263 2005/10/13 00:23:53 rillig Exp $
#
DISTNAME= pkglint-4.26
DISTNAME= pkglint-4.27
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty

View file

@ -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.296 2005/10/09 18:24:11 rillig Exp $
# $NetBSD: pkglint.pl,v 1.297 2005/10/13 00:23:53 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@ -1543,6 +1543,17 @@ sub checklines_package_Makefile($) {
if ($varname =~ qr"^SUBST_STAGE\." && $value !~ qr"^(?:pre|do|post)-(?:patch|configure|build|install)$") {
$line->log_warning("SUBST_STAGE should be one of {pre,do,post}-{patch,configure,build,install}");
}
if ($value =~ qr"\$\{(PKGNAME|PKGVERSION)[:\}]") {
my ($pkgvarname) = ($1);
if ($varname =~ qr"^PKG_.*_REASON$") {
# ok
} elsif ($varname =~ qr"^(?:DIST_SUBDIR|WRKSRC)$") {
$line->log_warning("${pkgvarname} should not be used in ${varname}, as it sometimes includes the PKGREVISION. Please use ${pkgvarname}_NOREV instead.");
} else {
$line->log_info("Use of PKGNAME in ${varname}.");
}
}
}
}