PERL5_DEFAULT != PERL5_DEFAULT depending on 'pwd'

Mathieu Arnold mat at FreeBSD.org
Fri Mar 3 09:45:45 UTC 2017


Le 03/03/2017 à 08:00, Harry Schmalzbauer a écrit :
>> 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.

Have you considered using poudriere ?

> 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...

The stage phase (the one where *-install runs) cannot remove the file
because it must be able to run again and produce the same result (make
restage), the real install phase could because it only installs the
package created earlier. The file gets created very early, in during the
extract phase, and gets removed in the clean phase.

> 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.

If you never run make clean, it never gets removed.


-- 
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/33428ce8/attachment.sig>


More information about the freebsd-perl mailing list