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.37.
details: https://anonhg.NetBSD.org/pkgsrc/rev/5ef0b726832b
branches: trunk
changeset: 502459:5ef0b726832b
user: rillig <rillig%pkgsrc.org@localhost>
date: Fri Nov 04 20:39:49 2005 +0000
description:
Updated pkglint to 4.37.
- Added checks for TOOL_* variables.
- Added {pre,do,post}-extract to the list of valid stages.
- Fixed the regular expression for detecting tool names.
- Added a check for invalid syntax in tool names.
- Improved the diagnostic for enumerations.
diffstat:
pkgtools/pkglint/Makefile | 4 ++--
pkgtools/pkglint/files/makevars.map | 8 +++++++-
pkgtools/pkglint/files/pkglint.pl | 17 ++++++++++++-----
3 files changed, 21 insertions(+), 8 deletions(-)
diffs (93 lines):
diff -r bbd6b7cfa8c1 -r 5ef0b726832b pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Fri Nov 04 20:36:42 2005 +0000
+++ b/pkgtools/pkglint/Makefile Fri Nov 04 20:39:49 2005 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.282 2005/11/04 17:00:58 rillig Exp $
+# $NetBSD: Makefile,v 1.283 2005/11/04 20:39:49 rillig Exp $
#
-DISTNAME= pkglint-4.36.1
+DISTNAME= pkglint-4.37
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff -r bbd6b7cfa8c1 -r 5ef0b726832b pkgtools/pkglint/files/makevars.map
--- a/pkgtools/pkglint/files/makevars.map Fri Nov 04 20:36:42 2005 +0000
+++ b/pkgtools/pkglint/files/makevars.map Fri Nov 04 20:39:49 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.26 2005/11/04 17:29:02 rillig Exp $
+# $NetBSD: makevars.map,v 1.27 2005/11/04 20:39:49 rillig Exp $
#
# This file contains the guessed type of some variables, according to
@@ -159,6 +159,12 @@
SUBST_FILES List* of Pathmask
SUBST_SED List*
SUBST_STAGE Stage
+TOOLS_ALIASES List of Filename
+TOOLS_BROKEN List of Tool
+TOOLS_CREATE List of Tool
+TOOLS_GNU_MISSING List of Tool
+TOOLS_NOOP List of Tool
+TOOLS_PATH Pathname
USE_JAVA { run yes }
USE_JAVA2 { yes 1.4 1.5 }
USE_LANGUAGES List* of { c c++ fortran java objc }
diff -r bbd6b7cfa8c1 -r 5ef0b726832b pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Fri Nov 04 20:36:42 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Fri Nov 04 20:39:49 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.330 2005/11/04 17:29:02 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.331 2005/11/04 20:39:49 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -1415,6 +1415,11 @@
REPLACE_RUBY
RESTRICTED
SITES_.*
+ TOOLS_ALIASES\.*
+ TOOLS_BROKEN
+ TOOLS_CREATE
+ TOOLS_GNU_MISSING
+ TOOLS_NOOP
);
my $plurals = join("|",
@plurals_ok,
@@ -1566,12 +1571,12 @@
$line->log_error("\"${varname}\" is a read-only variable and therefore must not be modified.");
} elsif ($type eq "Stage") {
- if ($value !~ qr"^(?:pre|do|post)-(?:patch|configure|build|install)$") {
- $line->log_warning("Invalid stage name. Use one of {pre,do,post}-{patch,configure,build,install}.");
+ if ($value !~ qr"^(?:pre|do|post)-(?:extract|patch|configure|build|install)$") {
+ $line->log_warning("Invalid stage name. Use one of {pre,do,post}-{extract,patch,configure,build,install}.");
}
} elsif ($type eq "Tool") {
- if ($value =~ qr"^(.*)(?::(.*))$") {
+ if ($value =~ qr"^(\w+)(?::(\w+))?$") {
my ($toolname, $tooldep) = ($1, $2);
if (!exists(get_tool_names()->{$toolname})) {
$line->log_error("Unknown tool \"${toolname}\".");
@@ -1579,6 +1584,8 @@
if (defined($tooldep) && $tooldep !~ qr"^(?:build|pkgsrc|run)$") {
$line->log_error("Unknown tool dependency \"${tooldep}\".");
}
+ } else {
+ $line->log_error("Invalid tool syntax: \"${value}\".");
}
} elsif ($type eq "URL") {
@@ -1658,7 +1665,7 @@
}
}
if (!$found) {
- $line->log_warning(sprintf("%s should be set to one of %s.", $varname, join(", ", @enum)));
+ $line->log_warning("\"${value}\" is not valid for ${varname}. Use one of ${type} instead.");
}
} else {
Home |
Main Index |
Thread Index |
Old Index