Date: Fri, 27 Apr 2012 20:48:45 +0200 (CEST) From: Marcus von Appen <mva@freebsd.org> To: FreeBSD-gnats-submit@freebsd.org Cc: python@freebsd.org Subject: Python version propagation breaks USE_PYTHON= usage for dependency builds Message-ID: <201204271848.q3RImjd5090552@medusa.sysfault.org>
next in thread | raw e-mail | index | archive | help
>Submitter-Id: current-users >Originator: Marcus von Appen >Organization: >Confidential: no >Synopsis: Python version propagation breaks USE_PYTHON= usage for dependency builds >Severity: non-critical >Priority: high >Category: ports >Class: sw-bug >Release: FreeBSD 8.3-PRERELEASE amd64 >Environment: System: FreeBSD medusa.sysfault.org 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #8: Tue Apr 10 19:38:00 CEST 2012 root@medusa.sysfault.org:/usr/obj/usr/src/sys/MEDUSA amd64 >Description: Given that port A defines PYTHON_VERSION=3.2, dependencies, which might define PYTHON_VERSION <> 3.2, will fail to build, since the version propagation to .MAKEFLAGS and DEPENDS_ARGS will cause a IGNORE to be triggered. bsd.python.mk Line 342: DEPENDS_ARGS+= PYTHON_VERSION=${PYTHON_VERSION} bsd.python.mk Line 357f. # Propagate the chosen python version to submakes. .MAKEFLAGS: PYTHON_VERSION=python${_PYTHON_VERSION} Both will cause PYTHON_VERSION to be appended to the command-line arguments/.MAKEFLAGS for the dependencies, causing the error described above. >How-To-Repeat: Create two directories /usr/ports/devel/fake1 and /usr/ports/devel/fake2. Add the Makefiles to each from the diffs below. diff -Nur /nonexistent/Makefile devel/fake1/Makefile --- /nonexistent/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ devel/fake1/Makefile 2012-04-27 20:19:53.000000000 +0200 @@ -0,0 +1,9 @@ +PORTNAME= fake1 +PORTVERSION= 1 +CATEGORIES= devel + +LIB_DEPENDS= fake2.0:${PORTSDIR}/devel/fake2 + +USE_PYTHON= 3.2 + +.include <bsd.port.mk> diff -Nur /nonexistent/Makefile devel/fake2/Makefile --- /nonexistent/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ devel/fake2/Makefile 2012-04-27 20:21:28.000000000 +0200 @@ -0,0 +1,7 @@ +PORTNAME= fake2 +PORTVERSION= 1 +CATEGORIES= devel + +USE_PYTHON= 2.5-3.1 + +.include <bsd.port.mk> Afterwards run "make depends" in /usr/ports/devel/fake1: /usr/ports/devel/fake1 # make depends ===> fake1-1 depends on shared library: fake2.0 - not found ===> Verifying install for fake2.0 in /usr/ports/devel/fake2 ===> fake2-1 needs Python 3.1 at most. But you specified 3.2. *** Error code 1 Stop in /usr/ports/devel/fake2. *** Error code 1 Stop in /usr/ports/devel/fake1. This approach currently break ports such as the enhancement PR for graphics/blender (ports/167061), in which blender pulls in devel/boost-python-libs as indirect dependency of graphics/openimageio. >Fix: The easiest would be to remove the both offending lines. However, those seem to be used to specify a Python version to (maybe) keep the installation count of different Python versions low. If there is no specific purpose for the both offending lines except from that, they should be removed.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204271848.q3RImjd5090552>