Skip site navigation (1)Skip section navigation (2)
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:   ports/167368: Python version propagation breaks USE_PYTHON= usage for dependency builds
Message-ID:  <201204271848.q3RImjd5090552@medusa.sysfault.org>
Resent-Message-ID: <201204271900.q3RJ0OTn074371@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         167368
>Category:       ports
>Synopsis:       Python version propagation breaks USE_PYTHON= usage for dependency builds
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 27 19:00:24 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Marcus von Appen
>Release:        FreeBSD 8.3-PRERELEASE amd64
>Organization:
>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.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204271848.q3RImjd5090552>