USE_PYTHON usage shadows dependency requirements and creates conflicts

Marcus von Appen mva at
Sat Apr 21 10:12:12 UTC 2012


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

Using USE_PYTHON=x.y in a port A, which has a dependency on another port
B, which also defines USE_PYTHON=q.w will cause a IGNORE to be raised
from, 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=	fake1
+LIB_DEPENDS=	fake2.0:${PORTSDIR}/devel/fake2
+.include <>

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=	fake2
+USE_PYTHON=	2.5-3.1
+.include <>

Execute 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.

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 at the moment?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url :

More information about the freebsd-ports mailing list