PERL5_DEFAULT != PERL5_DEFAULT depending on 'pwd'

Mathieu Arnold mat at FreeBSD.org
Thu Mar 2 23:15:23 UTC 2017


Le 02/03/2017 à 20:06, Harry Schmalzbauer a écrit :
>  Bezüglich Harry Schmalzbauer's Nachricht vom 02.03.2017 19:30 (localtime):
>>  hello,
>>
>> currently I'm trying to track the following problem:
>>
>> : cd /usr/ports/print/texinfo && make -VPERL5_DEFAULT
>> 5.24
>>
>> : cd /usr/ports/lang/perl5.24/ && make -VPERL5_DEFAULT
>> 5.20
>>
>> ???
>> Any hints?
> direct caus was the file /tmp/PERL5_DEFAULT, which contained
> PERL5_DEFAULT=5.20.
>
> But I have absolutely no idea why/how this was created and why it only
> affects when pwd=lang/perl5.??
>
> Still investigating....

TL;DR: You can remove that file.

The idea is that if you add to your make.conf
DEFAULT_VERSIONS=perl5=5.22, install lang/perl5.22, and then remove
DEFAULT_VERSIONS, Perl 5.22 will still be the default, because it is the
installed version, and not 5.24 that is defined as the default in
bsd.default-versions.mk.

Now, if you upgrade lang/perl5.22 from ports, either manually, or with
tools like portupgrade or portmaster, at one point, it removes the old
version, and installs the new one. The problem is that when the old
version has been removed, the default Perl version reverts back to 5.24,
and when lang/perl5.22 is installed again, it installs itself as a non
default version (which, for example, will not install
/usr/local/bin/perl) and you end up with a broken system.  To mitigate
that problem, during the build, all lang/perl5.* ports store the current
default version, and use that stored value when installing, so that it
does not change mid-flight.



-- 
Mathieu Arnold


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-perl/attachments/20170303/1cbfe27b/attachment.sig>


More information about the freebsd-perl mailing list