With FLAVOR support now in ports, a pkg repo can have multiple pkgs available for each origin, pkg install uses an unstable algorithm when choosing a pkg to install which leads to unwanted behaviour. If multiple pkgs match the install parameters, either using partial name or origin, then repeated pkg installs will choose different flavours each time. This means if you use a list of pkg origins to install and update pkgs then software you use will continuously break. As an example - # pkg search tqdm py27-tqdm-4.11.2 Fast, extensible progress bar for Python py36-tqdm-4.11.2 Fast, extensible progress bar for Python # pkg search misc/py-tqdm misc/py-tqdm Fast, extensible progress bar for Python misc/py-tqdm Fast, extensible progress bar for Python # pkg install misc/py-tqdm Updating HomeRepo repository catalogue... HomeRepo repository is up to date. All repositories are up to date. Checking integrity... done (1 conflicting) - py36-tqdm-4.19.4 [HomeRepo] conflicts with py27-tqdm-4.19.4 [HomeRepo] on /usr/local/bin/tqdm Cannot solve problem using SAT solver, trying another plan Checking integrity... done (0 conflicting) The following 1 package(s) will be affected (of 0 checked): New packages to be INSTALLED: py27-tqdm: 4.19.4 [HomeRepo] ... # pkg install misc/py-tqdm Updating HomeRepo repository catalogue... HomeRepo repository is up to date. All repositories are up to date. Checking integrity... done (1 conflicting) - py36-tqdm-4.19.4 [HomeRepo] conflicts with py27-tqdm-4.19.4 [installed] on /usr/local/bin/tqdm Checking integrity... done (0 conflicting) The following 2 package(s) will be affected (of 0 checked): Installed packages to be REMOVED: py27-tqdm-4.19.4 New packages to be INSTALLED: py36-tqdm: 4.19.4 [HomeRepo] ... # pkg install misc/py-tqdm Updating HomeRepo repository catalogue... HomeRepo repository is up to date. All repositories are up to date. Checking integrity... done (1 conflicting) - py27-tqdm-4.19.4 [HomeRepo] conflicts with py36-tqdm-4.19.4 [installed] on /usr/local/bin/tqdm Checking integrity... done (0 conflicting) The following 2 package(s) will be affected (of 0 checked): Installed packages to be REMOVED: py36-tqdm-4.19.4 New packages to be INSTALLED: py27-tqdm: 4.19.4 [HomeRepo]
Also, the bug, if there is one, is in misc/py-tqdm that should be using USE_PYTHON=concurrent.
(with the patch from bug 220214 to get the man page to not conflict)
Summary changed per comment from mat@.
The real issue is that repeating the same pkg install command can produce different results. py-tqdm is only one of many python ports that need updating to handle concurrent installs. It was a simple port with no deps that was only chosen as an example. Concurrent support is a different issue than the selection algorithm used by pkg. Flavours support for python is a first step that appears to also have plans on being used by other ports (like ruby) that may or may not support concurrent pkg installs. Improving the selection algorithm used by pkg can only prevent other issues in the future. A simple solution would be sorting found pkgs and installing the first, while a more advanced solution would consider DEFAULT_VERSIONS. I'm sure others would argue that in the initial example only one port should be installed, the one matching the set default version, which may or may not sort into first place.
Looks good to me.
Was committed with PR#226240