From owner-freebsd-ports-bugs@freebsd.org Tue Aug 30 22:58:32 2016 Return-Path: Delivered-To: freebsd-ports-bugs@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 B34E8BC9318 for ; Tue, 30 Aug 2016 22:58:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 97F2B15B for ; Tue, 30 Aug 2016 22:58:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u7UMwWrL035832 for ; Tue, 30 Aug 2016 22:58:32 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 212273] Mk/Uses/python.mk: [PATCH] PYTHON_VERSION improperly propagated through DEPENDS_ARGS Date: Tue, 30 Aug 2016 22:58:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Ports Framework X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: m.r.sopacua@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: portmgr@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter cc attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2016 22:58:32 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D212273 Bug ID: 212273 Summary: Mk/Uses/python.mk: [PATCH] PYTHON_VERSION improperly propagated through DEPENDS_ARGS Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Some People Priority: --- Component: Ports Framework Assignee: portmgr@FreeBSD.org Reporter: m.r.sopacua@gmail.com CC: freebsd-ports-bugs@FreeBSD.org Keywords: patch Created attachment 174236 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D174236&action= =3Dedit Fix PYTHON_VERSION propagation. In the following (not so corner) case, the propagation of PYTHON_VERSION through DEPENDS_ARGS will result in dependency bugs: PYTHON_VERSION?=3D python${_PYTHON_VERSION} DEPENDS_ARGS+=3D PYTHON_VERSION=3D${PYTHON_VERSION} So, on a submake through the depends target and Mk/Scripts/do-depends.sh PYTHON_VERSION will be set. Assume to python3.4. If a dependency specifies: USES=3D python:2 A warning is shown and a version is looked for that matches the port's desi= re. In this case _PYTHON_VERSION (with leading underscore) will be set to 2.7. However, since "Command line variables" are imported into the Makefile's variables it will be set already, so the downgraded version is not respecte= d. How to Repeat: 0. Add DEFAULT_VERSIONS+=3Dpython=3D3.4 to /etc/make.conf 1. Pre-build devel/py-setuptools and ensure package lives in correct place = for USE_PACKAGE_DEPENDS to work. 2. Uninstall setuptools 3. make -C ${PORTSDIR}/editors/libreoffice -DUSE_PACKAGE_DEPENDS clean depe= nds Expected result: Full build of libreoffice dependencies Actual result: =3D=3D=3D> serf-1.3.8_1 depends on file: /usr/local/bin/scons - not found =3D=3D=3D> install_depends "/usr/ports/devel/scons" "full-package" "" /!\ WARNING /!\ needs Python 2.7 at most. But a port depending on this one specified 3.4 =3D=3D=3D> NOTICE: The scons port currently does not have a maintainer. As a result, it is more likely to have unresolved issues, not be up-to-date, or even be remove= d in the future. To volunteer to maintain this port, please create an issue at: https://bugs.freebsd.org/bugzilla More information about port maintainership is available at: https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.htm= l#maintain-port =3D=3D=3D> License MIT accepted by the user =3D=3D=3D> scons-2.5.0 depends on file: /usr/local/sbin/pkg - found =3D=3D=3D> Fetching all distfiles required by scons-2.5.0 for building =3D=3D=3D> Extracting for scons-2.5.0 =3D> SHA256 Checksum OK for scons-2.5.0.tar.gz. =3D=3D=3D> Patching for scons-2.5.0 =3D=3D=3D> Applying FreeBSD patches for scons-2.5.0 =3D=3D=3D> scons-2.5.0 depends on package: py27-setuptools27>0 - not found =3D=3D=3D> install_depends "/usr/ports/devel/py-setuptools27" "full-package" "PYTHON_VERSION=3Dpython3.4" =3D=3D=3D> Installing existing package /var/packages/devstation/All/py34-setuptools34-23.1.0.txz [pkg.earth.jail] Installing py34-setuptools34-23.1.0... [pkg.earth.jail] Extracting py34-setuptools34-23.1.0: 100% Message from py34-setuptools34-23.1.0: ******************************************************************* Only /usr/local/bin/easy_install-3.4 script has been installed since Python 3.4 is not the default Python version. ******************************************************************* =3D=3D=3D> scons-2.5.0 depends on package: py27-setuptools27>0 - not found *** Error code 1 Note: The lines with =3D=3D=3D> install_depends is shown by an inserted debug out= put in Mk/Scripts/do-depends.sh: diff --git a/Mk/Scripts/do-depends.sh b/Mk/Scripts/do-depends.sh index 399a999..74534d8 100644 --- a/Mk/Scripts/do-depends.sh +++ b/Mk/Scripts/do-depends.sh @@ -170,6 +170,7 @@ for _line in ${dp_RAWDEPENDS} ; do fi # Now actually install the dependencies + echo "=3D=3D=3D> install_depends \"${origin}\" \"${target}\" \"${depends= _args}\"" install_depends "${origin}" "${target}" "${depends_args}" # Recheck if the installed dependency validates the pattern except for /nonex [ "${fct}" =3D "false" ] || ${fct} "${pattern}" This shows: a) The warning message about downgrading the package version b) The unchanged PYTHON_VERSION being propagated. The patch fixes the issue. Whether keeping this PYTHON_VERSION around later screws up _PYTHON_FEATURE_CONCURRENT, is currently beyond my scope. P.S. While researching Mk/Scripts/do-depends.sh it also showed two cases wh= ere depends_args is overwritten instead of appended to before install_depends is called. I'm currently assuming that's intentional. --=20 You are receiving this mail because: You are on the CC list for the bug.=