diff options
author | rillig <rillig@pkgsrc.org> | 2005-11-04 20:39:49 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-11-04 20:39:49 +0000 |
commit | 26fbd1036bf15dc00f4b148883be26161e63b9f4 (patch) | |
tree | d7af83a65a5f05a6b0588f7f08e64202ba214370 /pkgtools/pkglint/files | |
parent | 290846b86dae17368d19f4f6a0de6aeeb2b2b95b (diff) | |
download | pkgsrc-26fbd1036bf15dc00f4b148883be26161e63b9f4.tar.gz |
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 (limited to 'pkgtools/pkglint/files')
-rw-r--r-- | pkgtools/pkglint/files/makevars.map | 8 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 17 |
2 files changed, 19 insertions, 6 deletions
diff --git a/pkgtools/pkglint/files/makevars.map b/pkgtools/pkglint/files/makevars.map index 53039117d2f..812ea248a11 100644 --- a/pkgtools/pkglint/files/makevars.map +++ b/pkgtools/pkglint/files/makevars.map @@ -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_CLASSES List 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 --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 40a98afd788..18647b0ebc6 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.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 @@ sub get_regex_plurals() { REPLACE_RUBY RESTRICTED SITES_.* + TOOLS_ALIASES\.* + TOOLS_BROKEN + TOOLS_CREATE + TOOLS_GNU_MISSING + TOOLS_NOOP ); my $plurals = join("|", @plurals_ok, @@ -1566,12 +1571,12 @@ sub checktext_basic_vartype($$$$$) { $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 @@ sub checktext_basic_vartype($$$$$) { 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 @@ sub checktext_basic_vartype($$$$$) { } } 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 { |