What have I forgotten about specifying which Perl should be /opt/local/bin/perl?
macports at tprfct.net
Sat Jan 22 06:28:47 UTC 2022
I am afraid there is still confusion about port info action. According to the man page, it merely "Displays meta-information available for portname". This information comes from port definition, not from port installation. You may run "port info" on any port, regardless whether it is installed or not, and see that output. Port may be defined with multiple variants, and some of them may be pre-selected as defaults for the port, and will be used when port is installed without any explicit variants. Port info has nothing to do with a port that you installed.
If you want to see what variants a port was installed with, you have to use "installed" or "active" pseudo-portname:
`` The pseudo-portnames are:
o all: all the ports in each ports tree listed in sources.conf
o current: the port in the current working directory
o active: set of installed and active ports
o inactive: set of installed but inactive ports
o installed: set of all installed ports
Please note a clash of terms as there is port action "installed" and port pseudo-portname "installed". That is why "port installed" is a valid syntax ("installed" is an action here), while "port active" is not. You have to use action "echo" with "active", like "port echo active".
$ port active and perl5
Error: Unrecognized action "port active"
$ port echo active and perl5
$ man port
$ port echo installed and perl5
> On Jan 21, 2022, at 9:32 PM, Gabriel Rosenkoetter <gr at eclipsed.net> wrote:
> On 2022-01-21 23:48 EST, Kastus Shchuka wrote:
>> If you want to see just the active port, you may trim down the output like this:
>> $ port installed and active and perl5
>> The following ports are currently installed:
>> perl5 @5.28.3_0+perl5_30 (active)
>> Hope this helps to reduce confusion.
> Thank you!
> It does!
> I think the [+] label, in the output of `port info <whatever>` is a confusing UI/UX choice, especially in the context of the + as an argument to `port install <port> +<port>_version` to request activation of a specific Port version.
> I think displaying the default/anticipated version makes a lot of sense, I'm just saying the way that's expressed (and that the currently "active" version isn't expressed at all in *that* output) is confusing.
"port info" does not know if port is installed or not, and it does not care about it. It queries port definition, not an installed port.
> That is: I think using + both to say "install this version" and "regardless of what's active, our default would've been this" is a confusing conflation of symbols.
> Maybe `port info …` should use another symbol (*?) there, and should display the active version by bracketing the version name?
> That is, manually editing the output I posted earlier, maybe this format would be more clear:
>  (gr at wedge:~)% port info perl5
> perl5 @5.28.3 (lang)
> Sub-ports: perl5.16, perl5.18, perl5.20, perl5.22, perl5.24,
> perl5.26, perl5.28, perl5.30, perl5.32, perl5.34
> Variants: perl5_26, [*]perl5_28, perl5_30, perl5_32,
> * version standard, [bracketed] version active
> I didn't edit the first line there because I haven't (yet) looked at the code, so I don't understand where it's coming from. I'm confused about why that'd read "perl5 @5.28.3 (lang)" rather than "perl5 @5.34.0 (lang)" on the system in question.
5.28.3 is the version of the wrapper port perl5 which merely creates symlinks to a particular version of perl installed via perl5.30 or perl5.34 port. As any port it has to have some version, but it has nothing to do with real perl port installed.
> I guess that's an expression (by way of a DB query) of what a future `port install` would presume was available, but I don't think it's an accurate expression of what the installed software should expect to find out of `env perl`.
> Do I continue to miss something here?
I am afraid, yes. The difference between meta-information about a port and installed port.
> (I'm amply aware of the mechanisms available to write and suggest this alternate display through a pull request. I'm sending email instead to ask whether other people agree with my UX confusion and plausible change.)
> Gabriel Rosenkoetter (he/him)
> gr at eclipsed.net
More information about the macports-users