pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/python



Module Name:    pkgsrc
Committed By:   gdt
Date:           Sun Oct  2 22:58:52 UTC 2022

Modified Files:
        pkgsrc/lang/python: pyversion.mk

Log Message:
pyversion.mk: Define PYPKGPREFIX in error case

The specification for pyversion.mk says that it defines PYPKGPREFIX
and PYVERSSUFFIX.  Various buildlink files rely on these being
defined, as they are tested without guarding them for being empty.

When there is no valid python version, _PYTHON_VERSION was set to
"none", and PKG_FAIL_REASON defined, so the user gets a reasonable
error.  However, if a buildlink3 uses an unguarded PYPKGPREFIX, a
syntax error results, and the PKG_FAIL_REASON is not display.

This commit defines the two variables to "none" in the case of no
valid version, mirroring the treatment of _PYTHON_VERSION and
correcting a failure to follow the specification.  In this case the
build is going to fail one way or another, but it's vastly better to
have a useful error message.

(Tested earlier, but deferred during freeze.)


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 pkgsrc/lang/python/pyversion.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/python/pyversion.mk
diff -u pkgsrc/lang/python/pyversion.mk:1.141 pkgsrc/lang/python/pyversion.mk:1.142
--- pkgsrc/lang/python/pyversion.mk:1.141       Thu Jun 30 10:45:36 2022
+++ pkgsrc/lang/python/pyversion.mk     Sun Oct  2 22:58:52 2022
@@ -1,4 +1,4 @@
-# $NetBSD: pyversion.mk,v 1.141 2022/06/30 10:45:36 nia Exp $
+# $NetBSD: pyversion.mk,v 1.142 2022/10/02 22:58:52 gdt Exp $
 
 # This file determines which Python version is used as a dependency for
 # a package.
@@ -131,6 +131,8 @@ MULTI+=     PYTHON_VERSION_REQD=${_PYTHON_VE
 .if !defined(_PYTHON_VERSION)
 _PYTHON_VERSION=       none
 PKG_FAIL_REASON+=      "No valid Python version"
+PYPKGPREFIX=           none
+PYVERSSUFFIX=          none
 .endif
 
 # Additional CONFLICTS



Home | Main Index | Thread Index | Old Index