If a port is python 3 only, and it specifies 'concurrent' then all scripts installed into $PREFIX/bin will have a suffix. Since python defaults to version 2 no port ever gets a script without a suffix. However, some ports are split in two: a python2 and a python3 version. In this case the latter port is correctly handled. I can suggest either (or both): 1) Adding another flag to indicate with version of python the USE_DEFAULT_LINKS should be applied, or 2) Dynamically detecting that a port only supports a specific major version of python, then specify USE_DEFAULT_LINKS for the default python version for the port's supported major version. This will exclude ports who's directory name does not start with 'py-'. I suggest both approaches. The affected ports appear to be: # find . -name Makefile | xargs grep USE_PYTHON | grep concurrent | cut -f 1 -d : | xargs grep USES | grep python:3 | cut -f 1 -d : | sed -e 's|/Makefile||g' -e 's|\./||g' sysutils/py-diffoscope ports-mgmt/py-skog (false positives) devel/py3-babel devel/py3-Jinja2 textproc/py3-pager textproc/py3-MarkupSafe textproc/py3-chardet
Fixed with flavors.
This is still broken: # cd /usr/ports/ports-mgmt/py-skog # make -V USES python:3.3+ # make -V PYTHON_VERSION python3.6 # make -V UNIQUE_DEFAULT_LINKS no ^^ problem here
Created attachment 188721 [details] Proof of concept fix I suggest that the default version, as determined by the first item in the _VALID_PYTHON_VERSIONS, should be used to detect when UNIQUE_DEFAULT_LINKS should be yes. The attached is such a proof of concept, however it will not work unless flavors are enables in python.mk - but that is an easy fix. If you are happy I can finish the patch and commit it.
But, I was in the area so I finished the patch. Please see https://reviews.freebsd.org/D13449. And, apologies for the spam on this bug.
(In reply to David Naylor from comment #2) Is your ports tree up to date? I can't reproduce the problem.
(In reply to Antoine Brodin from comment #5) Ah, I see commit rX today introduced the fix. I can confirm it fixes comment #2. I'm not sure how realistic this situation is, but I do get: # cd /usr/ports/ports-mgmt/py-skog # make -V UNIQUE_DEFAULT_LINKS USE_PYTHON="autoplist concurrent distutils noflavors" no The proof of concept attached, I believe, will work in this situation as well.
Added a DEV_WARNING to prevent foot shooting.