diff options
author | rillig <rillig@pkgsrc.org> | 2014-10-08 19:15:16 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2014-10-08 19:15:16 +0000 |
commit | e72650b322d95f0dbe3602918b2a92bb7d0c5ec5 (patch) | |
tree | 961099f33a404b4e45e79288d84e64d3e08a6b33 /pkgtools | |
parent | 05ff444161716ca9150fe8b0c1405eac69015836 (diff) | |
download | pkgsrc-e72650b322d95f0dbe3602918b2a92bb7d0c5ec5.tar.gz |
Fixed variable type of PYTHON_VERSIONED_DEPENDENCIES, so that build-time
and run-time dependencies can be specified without pkglint warnings.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/makevars.map | 9 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 16 |
2 files changed, 21 insertions, 4 deletions
diff --git a/pkgtools/pkglint/files/makevars.map b/pkgtools/pkglint/files/makevars.map index 3f8d162863f..1be6e487f50 100644 --- a/pkgtools/pkglint/files/makevars.map +++ b/pkgtools/pkglint/files/makevars.map @@ -1,4 +1,4 @@ -# $NetBSD: makevars.map,v 1.254 2014/08/07 20:35:34 wiz Exp $ +# $NetBSD: makevars.map,v 1.255 2014/10/08 19:15:16 rillig Exp $ # # This file contains the guessed type of some variables, according to @@ -10,9 +10,12 @@ # The type Yes is used for variables that are checked using # .if defined(VAR) # -# Type type List is used for lists of things. There are two types of lists, +# The type List is used for lists of things. There are two types of lists, # InternalList and List, which are described in the pkgsrc guide, chapter # "Makefiles". +# +# The other types are described in pkglint.pl, checkline_mk_vartype_basic. +# # # Some commonly used ACLs. For further documentation, see the chapter @@ -656,7 +659,7 @@ PYTHON_VERSIONS_ACCEPTED List of Version [$package] PYTHON_VERSIONS_INCOMPATIBLE List of Version [$package] PYTHON_VERSION_DEFAULT Version [$user] PYTHON_VERSION_REQD Version [$user] -PYTHON_VERSIONED_DEPENDENCIES List of Identifier [$package_list] +PYTHON_VERSIONED_DEPENDENCIES List of PythonDependency [$package_list] RANLIB ShellCommand [$system] RCD_SCRIPTS List of Filename [$package_list] RCD_SCRIPT_SRC.* List of Pathname [m:s] diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 91beb013e9a..d36fd661d37 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.870 2014/09/08 12:05:10 wiz Exp $ +# $NetBSD: pkglint.pl,v 1.871 2014/10/08 19:15:16 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -4317,6 +4317,20 @@ sub checkline_mk_vartype_basic($$$$$$$$) { } }, + PythonDependency => sub { + if ($value ne $value_novar) { + $line->log_warning("Python dependencies should not contain variables."); + } + if ($value_novar !~ m"^[+\-.0-9A-Z_a-z]+(?:|:link|:build)$") { + $line->log_warning("Invalid Python dependency \"${value}\"."); + $line->explain_warning( +"Python dependencies must be an identifier for a package, as specified", +"in lang/python/versioned_dependencies.mk. This identifier may be", +"followed by :build for a build-time only dependency, or by :link for", +"a run-time only dependency."); + } + }, + RelativePkgDir => sub { checkline_relative_pkgdir($line, $value); }, |