Handling of multiple Portfile versions

Artur Szostak aszostak at partner.eso.org
Mon Nov 9 09:18:47 PST 2015

OK, I got confused because Rainer started off with "Yes this is supported...", sorry.
I conclude that what I am asking for is not supported.

From: Brandon Allbery [allbery.b at gmail.com]
Sent: 09 November 2015 18:16
To: Artur Szostak
Cc: Rainer Müller; macports-dev
Subject: Re: Handling of multiple Portfile versions

On Mon, Nov 9, 2015 at 12:10 PM, Artur Szostak <aszostak at partner.eso.org<mailto:aszostak at partner.eso.org>> wrote:
> considered by MacPorts. The first ports tree that contains a port by
> that name in the order listed in sources.conf will be used. All other
> Portfiles in ports trees listed below that are not considered at all for
> any port action.

>> port install myport @1.2
> This syntax is not supported for 'port install'. The port with this name
> is installed, you cannot specify a version.

OK, then given my specific example above, how do I install myport version 1.2 rather than version 3.4? Or conversely, how do I install version 3.4 rather than 1.2? It seems like you are telling me MacPorts will make a random selection and there is no way to control this. If that is the case then surely concurrent multiple versions of Portfiles from different repositories are not properly supported.

As quoted above: the first one found via sources.conf will be used. In this case it will be 3.4. You would need to swap the sources.conf entries to get 1.2.

OK, I misunderstood the selection mechanism of the port command. How about the following alternative, should that work?

port install myport and version:1\.2
port activate myport and version:1\.2

No. The first one found via sources.conf will be used; as you specified them that will *always* be 3.4. The other Portfile is effectively invisible; you *cannot* select it.
If, on the other hand, you had already installed via that Portfile (by swapping sources.conf entries as above), then you could manipulate *that* installation using the @version syntax (and it will use the Portfile stored in the registry from that install, not the one for the currently available version).

So if the command with the @version syntax is not following the dependencies when using the --follow-dependencies option, then I have a bug?

It follows the dependencies recorded for the specific version that you are removing. If those are incorrect then you have a Portfile bug for that version.

brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com<mailto:allbery.b at gmail.com>                                  ballbery at sinenomine.net<mailto:ballbery at sinenomine.net>
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20151109/88650511/attachment.html>

More information about the macports-dev mailing list