summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrillig <rillig>2005-11-08 21:09:48 +0000
committerrillig <rillig>2005-11-08 21:09:48 +0000
commita962a7acbded2010749b10285e7c1e0e4b96c740 (patch)
tree94ec2a8646a3e959b23997e2e553aef1b85d830b
parent650256c71c8b42813d02ce13db3ee0e21d96814e (diff)
downloadpkgsrc-a962a7acbded2010749b10285e7c1e0e4b96c740.tar.gz
Updated pkglint to 4.38.1.
- It is an error if packages define a variable whose name starts with an underscore. - Removed the (vague) "wip" check, as it has been replaced by special checks for DEPENDS and .include directives. - Disabled the check for variable ordering until the discussion on tech-pkg has led to any results.
-rw-r--r--pkgtools/pkglint/Makefile4
-rw-r--r--pkgtools/pkglint/files/pkglint.pl16
2 files changed, 9 insertions, 11 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index a2b54f4182c..13bf0f2e131 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.286 2005/11/07 00:45:01 rillig Exp $
+# $NetBSD: Makefile,v 1.287 2005/11/08 21:09:48 rillig Exp $
#
-DISTNAME= pkglint-4.38
+DISTNAME= pkglint-4.38.1
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index a12bb1fef9a..5e2f89961df 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.337 2005/11/07 00:45:01 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.338 2005/11/08 21:09:48 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -2083,6 +2083,10 @@ sub checklines_package_Makefile($) {
if ($text =~ regex_varassign) {
my ($varname, $op, $value, $comment) = ($1, $2, $3, $4);
+ if ($varname =~ qr"^_") {
+ $line->error("Variable names starting with an underscore are reserved for internal pkgsrc use.");
+ }
+
if ($varname eq "COMMENT") {
if ($value =~ qr"^(a|an)\s+"i) {
$line->log_warning("COMMENT should not begin with '$1'.");
@@ -2307,13 +2311,6 @@ sub checkfile_package_Makefile($$$) {
checklines_direct_tools($lines);
- # whole file: check for pkgsrc-wip remnants
- #
- if ($whole =~ /\/wip\//
- && $category ne "wip") {
- $opt_warn_vague && log_error(NO_FILE, NO_LINE_NUMBER, "Possible pkgsrc-wip pathname detected.");
- }
-
if ($whole =~ /etc\/rc\.d/) {
$opt_warn_vague && log_warning(NO_FILE, NO_LINE_NUMBER, "Use RCD_SCRIPTS mechanism to install rc.d ".
"scripts automatically to \${RCD_SCRIPTS_EXAMPLEDIR}.");
@@ -2514,7 +2511,8 @@ sub checkfile_package_Makefile($$$) {
}
checklines_package_Makefile($lines);
- checklines_package_Makefile_varorder($lines);
+ # Disabled, as I don't like the current ordering scheme.
+ #checklines_package_Makefile_varorder($lines);
checklines_Makefile_varuse($lines);
}