PERL5_DEFAULT != PERL5_DEFAULT depending on 'pwd'
Harry Schmalzbauer
freebsd at omnilan.de
Fri Mar 3 07:00:23 UTC 2017
Bezüglich Mathieu Arnold's Nachricht vom 03.03.2017 00:15 (localtime):
> 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.
Thank you very much for your explanation.
I've had a quick look into bsd.default-versions.mk and found
$_PERL5_FROM_BIN, so the above is clear.
> 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.
Now I know what it is good for :-)
To my environment:
It's a plain building jail.
I haven't defined any PER5_VER(SION), it gets just installed as
build-depends. The dependency-installation (and removal) is probably
done multiple times (during batch package building).
So if I consider your last scenario, 'make deinstall' would be the
target where /tmp/PERL5_DEFAULT could be created. But I think 'make
(post-)install' can/should/must remove it, which didn't happen in my case.
That seems to be a problem, because /tmp/PERL5_DEFAULT doesn't affect
any other dependency-check outside lang/perl5.??. Not to mention
"daily_clean_tmps_enable=yes" or md-backed /tmp...
I haven't figured out which port insisted on 5.20. Like mentioned I
haven't set any PERL5-related demand, so PERL5_DEFAULT=5.20 shouldn't
have appeared anywhere. Unfortunately I don't have time to reproduce and
figure out what's happening in which order to run into that dependency
inconsitency. But I guess removing /tmp/PERL5_DEFAULT is the real fix.
Thanks,
-harry
More information about the freebsd-perl
mailing list