From owner-freebsd-python@FreeBSD.ORG Fri Apr 27 18:54:00 2012 Return-Path: Delivered-To: python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67B7B1065672; Fri, 27 Apr 2012 18:54:00 +0000 (UTC) (envelope-from mail@sysfault.org) Received: from smtprelay04.ispgateway.de (smtprelay04.ispgateway.de [80.67.31.38]) by mx1.freebsd.org (Postfix) with ESMTP id E88F88FC0A; Fri, 27 Apr 2012 18:53:59 +0000 (UTC) Received: from [89.182.23.165] (helo=medusa.sysfault.org) by smtprelay04.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1SNqCZ-000091-8n; Fri, 27 Apr 2012 20:47:31 +0200 Received: from [127.0.0.1] (helo=medusa.sysfault.org) by medusa.sysfault.org with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SNqDl-000NYX-A0; Fri, 27 Apr 2012 20:48:45 +0200 Received: (from marcus@localhost) by medusa.sysfault.org (8.14.5/8.14.5/Submit) id q3RImjd5090552; Fri, 27 Apr 2012 20:48:45 +0200 (CEST) (envelope-from marcus) Date: Fri, 27 Apr 2012 20:48:45 +0200 (CEST) Message-Id: <201204271848.q3RImjd5090552@medusa.sysfault.org> To: FreeBSD-gnats-submit@freebsd.org From: Marcus von Appen X-send-pr-version: 3.113 X-GNATS-Notify: X-Df-Sender: OTM2OTM0 Cc: python@freebsd.org Subject: Python version propagation breaks USE_PYTHON= usage for dependency builds X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Marcus von Appen List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 18:54:00 -0000 >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 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 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.