A pre-everything check in lang/perl5.26 suggest that the user can set DEFAULT_VERSIONS=perl5=5.26 in make.conf to make perl5.26 install files as the default perl (bin/perl, bin/perl5, etc.). This fails if a different perl (e.g., perl5.24) is already installed. Even if this behavior is not changed, the wording of the pre-everything message should probably be clarified to account for this case.
(In reply to John Hein from comment #0) I should have said that it fails if perl5.24 (or another perl, such as perl5.22) was installed as the default (i.e., bin/perl exists and points to a version other than the version the user says he wants to be the default via DEFAULT_VERSIONS=perl5=x.y).
Never mind. There was a stray /tmp/PERL5_DEFAULT file that had 'PERL5_DEFAULT=5.24'. Closing as not-a-bug. Or maybe it's a different issue (/tmp/PERL5_DEFAULT not getting cleaned up and affecting later builds). I wonder if that mechanism (_PERL_DEFAULT_FILE stuff) is still useful or necessary? But that requires more analysis and would be a separate bug.
Ok, so, the _PERL_DEFAULT_FILE was there for a good reason to begin with, which is installing a Perl that is not the default as the default, but I am wondering if it is still needed too, I will investigate a bit.
(In reply to Mathieu Arnold from comment #3) I started a review regarding this... https://reviews.freebsd.org/D15016
Ok, took me a while to remember why this is still needed. - Default Perl is 5.24. - You install stuff, and have Perl 5.24. - The default Perl is changed to 5.26. - You do not really follow those things and are not using pkg (and possibly poudriere) to maintain your /usr/local and you run portmaster to update what needs to be updated. - As you did not set anything, your Perl default is still 5.24 because it is the installed /usr/local/bin/perl. - Turns out that there has been a new version of Perl 5.24 in the mean time, and portmaster updates it. Keep in mind that the only thing that makes 5.24 the default is that it is the installed version you have. If you did not have it installed, the default would be 5.26. - portmaster builds the new perl 5.24, and before it installs it, it needs to remove the old version. - now, you do not have any Perl installed, so the default falls back to 5.26. - portmaster installs perl 5.24 it just built, but as it is not the default any pore, it will not install /usr/local/bin/perl, and everything using Perl on your system is toast, you spend countless hours not understanding wtf happened. You end up rebuilding everything with 5.26. So, this *is* still required.
A commit references this bug: Author: mat Date: Fri Jun 29 14:08:41 UTC 2018 New revision: 473550 URL: https://svnweb.freebsd.org/changeset/ports/473550 Log: Make a note about why this hack is required. Here is the story: - Default Perl is 5.24. - You install stuff, and have Perl 5.24. - The default Perl is changed to 5.26 because it was time. - You do not really follow those things and are not using pkg (and possibly poudriere) to maintain your /usr/local and you run portmaster to update what needs to be updated. - As you did not set anything, your Perl default is still 5.24 because it is the installed /usr/local/bin/perl. - Turns out that there has been a new version of lang/perl5.24 in the mean time, and portmaster updates it. Keep in mind that the only thing that makes 5.24 the default is that it is the installed version you have. If you did not have it installed, the default would be 5.26. - portmaster builds the new perl 5.24, and before it installs it, it needs to remove the old version. - now, you do not have any Perl installed, so the default falls back to 5.26. - portmaster installs perl 5.24 it just built, but as it is not the default any pore, it will not install /usr/local/bin/perl, and everything using Perl on your system is toast, you spend countless hours not understanding wtf happened. You end up rebuilding everything with 5.26. PR: 227356 Sponsored by: Absolight Changes: head/lang/perl5-devel/Makefile head/lang/perl5.24/Makefile head/lang/perl5.26/Makefile head/lang/perl5.28/Makefile