From owner-svn-ports-head@freebsd.org Thu Dec 14 13:48:59 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC504E809BA; Thu, 14 Dec 2017 13:48:59 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B998664803; Thu, 14 Dec 2017 13:48:59 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEDmwDP090701; Thu, 14 Dec 2017 13:48:58 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEDmwG9090700; Thu, 14 Dec 2017 13:48:58 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201712141348.vBEDmwG9090700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Thu, 14 Dec 2017 13:48:58 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r456293 - head/Mk/Uses X-SVN-Group: ports-head X-SVN-Commit-Author: mat X-SVN-Commit-Paths: head/Mk/Uses X-SVN-Commit-Revision: 456293 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 13:49:00 -0000 Author: mat Date: Thu Dec 14 13:48:58 2017 New Revision: 456293 URL: https://svnweb.freebsd.org/changeset/ports/456293 Log: Rework PY_FLAVOR to always work. Before this, it could have been set to the current flavor of the port that may not have been related to Python at all. This of course never came up during development because at that time, the only flavors were the Python flavors. Reported by: dbn Sponsored by: Absolight Modified: head/Mk/Uses/python.mk Modified: head/Mk/Uses/python.mk ============================================================================== --- head/Mk/Uses/python.mk Thu Dec 14 13:41:10 2017 (r456292) +++ head/Mk/Uses/python.mk Thu Dec 14 13:48:58 2017 (r456293) @@ -463,11 +463,12 @@ PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX} .endif # To avoid having dependencies with @ and empty flavor: -.if empty(FLAVOR) -PY_FLAVOR= ${PYTHON_VERSION:S/^python/py/:S/.//} -.else -PY_FLAVOR= ${FLAVOR} -.endif +# _PYTHON_VERSION is either set by (first that matches): +# - If using Python flavors, from the current Python flavor +# - If using a version restriction (USES=python:3.4+), from the first +# acceptable default Python version. +# - From PYTHON_DEFAULT +PY_FLAVOR= py${_PYTHON_VERSION:S/.//} # Pass PYTHON_VERSION down the dependency chain. This ensures that # port A -> B -> C all will use the same python version and do not