Bug 201233 - Mk/Uses/perl5.mk
Summary: Mk/Uses/perl5.mk
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-30 20:30 UTC by Franco Fichtner
Modified: 2015-07-27 14:47 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Franco Fichtner 2015-06-30 20:30:14 UTC
Using e.g. DEFAULT_VERSIONS=perl5=5.18 is overwritten on systems that have another perl5 already installed.

Should the code be made lower priority or maybe even zapped completely?

Reference: https://github.com/freebsd/freebsd-ports/blob/master/Mk/Uses/perl5.mk#L45-L49
Comment 1 Mathieu Arnold freebsd_committer freebsd_triage 2015-06-30 21:03:42 UTC
There can be only *one* Perl installed at a time, so, if you have another Perl installed and you want Perl 5.18, remove the other one.
Comment 2 Franco Fichtner 2015-06-30 21:12:20 UTC
Wow, thanks for being dismissive.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2015-07-03 03:26:40 UTC
Although I'm not involved in this, please allow me to try to explain.

Most long-term users of the Ports Collection are aware of the restriction that only one version of certain pieces of software (perl, python, apache, ...) can be installed at a time.  The effort to rearchitect things to allow that would be quite large.

I know we don't advertise this fact very well.

What you were hearing here is just the sound of frustration.  I'm sorry.
Comment 4 Franco Fichtner 2015-07-27 14:47:23 UTC
Thanks for responding, Mark. I talked this over a little with @swills and it's a bit odd that the infrastructure overrides the user selection. I would simply expect the ports framework to fail with a message that it can't set the perl version since a different one is already installed. The situation is easily forced either while using packages and ports on the same machine (I know, don't do it, but there's no reason not to do it if the framework would adapt better) or when compiling perl5 from ports having forgot to set the default version in the first place.

@swills wasn't opposed to a warning message, I don't know if that is radical enough here. In any case, just an observation on how expected behaviour goes against what is being executed underneath. It was pretty hard to catch and debug this in the first place.

Cheers,
Franco