Bug 195152 - The ports infrastructure will build dependencies against the default version of Python rather than what the desired port requires
Summary: The ports infrastructure will build dependencies against the default version ...
Status: Closed Not Enough Information
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-18 16:08 UTC by Andrew Berg
Modified: 2019-08-23 02:54 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Berg 2014-11-18 16:08:56 UTC
There are two affected ports that I know of so far: sysutils/py-salt and sysutils/qzeitgeist. I will use Salt as the example of the "master" port and pyzmq as the example of the dependency here.

First some background information on this example:
Unless overridden by the user, Python 2.7 is the default version of Python. This issue is triggered only when 3.x is specified as the default (in my case, 3.4).
Salt can only use Python 2.
In its Makefile, it has net/py-pyzmq and many other Python-based dependencies. The Makefile uses ${PYTHON_PKGNAMEPREFIX} to ensure that it will use only packages of these dependencies that are built against the same version of Python that Salt itself will use (I do not know if this is strictly necessary for every single one, but it makes sense, and I will assume that it is).
net/py-pyzmq is compatible with both Python 2 and Python 3. A package can be successfully built with any supported version of Python.
When Salt needs to be built, net/py-pyzmq is (correctly) identified as a dependency.

The problem:
When net/py-pyzmq is built to satisfy the dependency for Salt, it is built for the default version of Python, and the actual requirement for Salt is not met. If the user simply wants only pyzmq, perhaps for their own development project, then building for the default version of Python is desired behavior.

Poudriere results for this condition:
https://candace.robotsondrugs.com/poudriere/build.html?mastername=101x64-porttest&build=2014.11.18_09:51:10

Note: This is my test ports jail because I needed to modify net/openpgm (see bug 194917).
Comment 1 Andrew Berg 2015-01-25 19:01:58 UTC
I thought I had either added a note or closed this bug, but apparently not.

After filing this PR, I found out that this only affects Poudriere because of its separation of builds and refusal to build dependencies for a package during a build (it builds each dependency separately beforehand and installs them during a build of whatever depends on them). I'm not entirely sure whether there is anything that can (or should) be done to the ports tree to help with this. However, I will leave this open in case someone has some ideas.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-08-23 02:54:24 UTC
Per comment 2, if this is still an issue and reproducible in the latest poudriere versions (including -devel), please report it upstream at: https://github.com/freebsd/poudriere/. If it turns out there is an underlying framework issue as a root cause, please re-open this issue with additional details accordingly