Created attachment 195366 [details] Fix symlinks to point to `ansible-${PYTHON_VER}` (not to `ansible`), against ports head As requested, a separate bug report for fixing `ansible-playbook-3.6 -> ansible` symlinks to correctly use `ansible-playbook-3.6 -> ansible-3.6`. The attached patch only fixes the issue – the committer has to adapt PORTREVISION accordingly. Before for @py36 flavor: -rwxr-xr-x 1 root wheel 5850 Jul 22 10:20 ansible-3.6 lrwxr-xr-x 1 root wheel 7 Jul 22 10:20 ansible-config-3.6 -> ansible -rwxr-xr-x 1 root wheel 10982 Jul 22 10:20 ansible-connection-3.6 lrwxr-xr-x 1 root wheel 7 Jul 22 10:20 ansible-console-3.6 -> ansible lrwxr-xr-x 1 root wheel 7 Jul 22 10:20 ansible-doc-3.6 -> ansible lrwxr-xr-x 1 root wheel 7 Jul 22 10:20 ansible-galaxy-3.6 -> ansible lrwxr-xr-x 1 root wheel 7 Jul 22 10:20 ansible-inventory-3.6 -> ansible lrwxr-xr-x 1 root wheel 7 Jul 22 10:20 ansible-playbook-3.6 -> ansible lrwxr-xr-x 1 root wheel 7 Jul 22 10:20 ansible-pull-3.6 -> ansible lrwxr-xr-x 1 root wheel 7 Jul 22 10:20 ansible-vault-3.6 -> ansible After (list for both flavors): lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible -> ansible-2.7 -rwxr-xr-x 1 root wheel 5850 Jul 22 13:28 ansible-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-config -> ansible-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-config-2.7 -> ansible-2.7 lrwxr-xr-x 1 root wheel 22 Jul 22 13:28 ansible-connection -> ansible-connection-2.7 -rwxr-xr-x 1 root wheel 10982 Jul 22 13:28 ansible-connection-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-console -> ansible-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-console-2.7 -> ansible-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-doc -> ansible-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-doc-2.7 -> ansible-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-galaxy -> ansible-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-galaxy-2.7 -> ansible-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-inventory -> ansible-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-inventory-2.7 -> ansible-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-playbook -> ansible-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-playbook-2.7 -> ansible-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-pull -> ansible-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-pull-2.7 -> ansible-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-vault -> ansible-2.7 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-vault-2.7 -> ansible-2.7 -rwxr-xr-x 1 root wheel 5850 Jul 22 13:28 ansible-3.6 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-config-3.6 -> ansible-3.6 -rwxr-xr-x 1 root wheel 10982 Jul 22 13:28 ansible-connection-3.6 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-console-3.6 -> ansible-3.6 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-doc-3.6 -> ansible-3.6 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-galaxy-3.6 -> ansible-3.6 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-inventory-3.6 -> ansible-3.6 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-playbook-3.6 -> ansible-3.6 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-pull-3.6 -> ansible-3.6 lrwxr-xr-x 1 root wheel 11 Jul 22 13:28 ansible-vault-3.6 -> ansible-3.6
Thank you for your submission! I'm reviewing it.
A commit references this bug: Author: lifanov Date: Tue Jul 24 03:16:33 UTC 2018 New revision: 475222 URL: https://svnweb.freebsd.org/changeset/ports/475222 Log: fix symlinks for ansible when non-default version is installed The issue is that before stage, other binaries are links to ansible: bin/ansible-vault -> bin/ansible bin/ansible-playbook -> bin/ansible During stage, these get renamed with a suffix, like 3.6, but the target of the symlink doesn't change: bin/ansible-vault-3.6 -> bin/ansible bin/ansible-playbook-3.6 -> bin/ansible This either creates broken links if the package for the default Python version is not installed or it creates links to the wrong binary if it is. Thank you Andreas Sommer for the fix! PR: 229960 Submitted by: Andreas Sommer Changes: head/sysutils/ansible/Makefile head/sysutils/ansible1/Makefile head/sysutils/ansible23/Makefile head/sysutils/ansible24/Makefile head/sysutils/ansible25/Makefile
Committed, thanks!