summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2005-10-13 00:23:53 +0000
committerrillig <rillig>2005-10-13 00:23:53 +0000
commitc99c64e8a3b6110b03a27da505fd8c4e8567e998 (patch)
tree97a1212650682166c4f337e5d786d91fcfa7ba02 /pkgtools
parente9ca75fc403fde79785d17a7aa0d7076cf193615 (diff)
downloadpkgsrc-c99c64e8a3b6110b03a27da505fd8c4e8567e998.tar.gz
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.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/Makefile4
-rw-r--r--pkgtools/pkglint/files/pkglint.pl13
2 files changed, 14 insertions, 3 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index 707180f0a13..eee4ee47fa6 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -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
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 30acb408139..4880121d242 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.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}.");
+ }
+ }
}
}