pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/python pyversion.mk: Define PYPKGPREFIX in error ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/af6d640660a8
branches: trunk
changeset: 386191:af6d640660a8
user: gdt <gdt%pkgsrc.org@localhost>
date: Sun Oct 02 22:58:52 2022 +0000
description:
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.)
diffstat:
lang/python/pyversion.mk | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (18 lines):
diff -r ee87ffd6347f -r af6d640660a8 lang/python/pyversion.mk
--- a/lang/python/pyversion.mk Sun Oct 02 21:43:28 2022 +0000
+++ b/lang/python/pyversion.mk Sun Oct 02 22:58:52 2022 +0000
@@ -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 @@
.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