Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Apr 2012 12:12:53 +0200
From:      Marcus von Appen <mva@FreeBSD.org>
To:        freebsd-ports@freebsd.org
Cc:        python@freebsd.org
Subject:   USE_PYTHON usage shadows dependency requirements and creates conflicts
Message-ID:  <20120421101253.GA1496@medusa.sysfault.org>

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

--6c2NcOVqGQ03X4Wi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

I stumbled upon an interesting issue today, which might have been
discussed at length earlier, but I was unable to find any reference so
far.

Using USE_PYTHON=3Dx.y in a port A, which has a dependency on another port
B, which also defines USE_PYTHON=3Dq.w will cause a IGNORE to be raised
=66rom bsd.python.mk, since _PYTHON_VERSION_NONSUPPORTED gets set to
whatever the USE_PYTHON value from port A was.

Test case:

Create 2 directories, /usr/ports/devel/fake1 and /usr/ports/devel/fake2

Add the Makefiles (diffs below) to both:

diff -Nur /nonexistent/Makefile fake1/Makefile
--- /nonexistent/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ fake1/Makefile	2012-04-21 11:55:05.000000000 +0200
@@ -0,0 +1,9 @@
+PORTNAME=3D	fake1
+PORTVERSION=3D	1
+CATEGORIES=3D	devel
+
+LIB_DEPENDS=3D	fake2.0:${PORTSDIR}/devel/fake2
+
+USE_PYTHON=3D	3.2
+
+.include <bsd.port.mk>

diff -Nur /nonexistent/Makefile fake2/Makefile
--- /nonexistent/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ fake2/Makefile	2012-04-21 11:55:13.000000000 +0200
@@ -0,0 +1,6 @@
+PORTNAME=3D	fake2
+PORTVERSION=3D	1
+
+USE_PYTHON=3D	2.5-3.1
+
+.include <bsd.port.mk>


Execute make depends in /usr/ports/devel/fake1.

/usr/ports/devel/fake1 # make depends
=3D=3D=3D>   fake1-1 depends on shared library: fake2.0 - not found
=3D=3D=3D>    Verifying install for fake2.0 in /usr/ports/devel/fake2
=3D=3D=3D>  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.

Installing fake2 before fake1 will circumvent the problem, which however
does not help the typical ports tree user.

It looks to me like we have an isolation issue for environment/make
variables here. Could other parts be affected, too or can we assume that
this issue solely affects bsd.python.mk at the moment?

Regards
Marcus

--6c2NcOVqGQ03X4Wi
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAk+SiCUACgkQi68/ErJnpkfdtwCgywDkZ2G1eLWebu38xPjaQ7PW
UeMAn3tSeajxeAWAeP5gAvtpzQcAkY04
=I60L
-----END PGP SIGNATURE-----

--6c2NcOVqGQ03X4Wi--



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