MacPorts missing links

Ryan Schmidt ryandesign at macports.org
Sun Sep 11 15:22:11 PDT 2016


> On Sep 11, 2016, at 4:57 PM, David Epstein <David.Epstein at warwick.ac.uk> wrote:
> 
> Thanks very much for all your work on my issue: much appreciated.
> 
> However, it’s looking like too much manual work, and also somewhat hazardous, at least to me as a non-expert. Moreover, I have no confidence that everything will be consistent, even if I successfully and correctly manually delete a number of symlinks, regular files and directories from /opt/local. Rather than spend more time on the problem, I will now move /opt/local to /opt/local.old and start again from scratch.

If you like, but that sounds like a lot of work to me. It didn't sound like there was anything particularly wrong with your old MacPorts installation, aside from a few broken symlinks created by port select, and maybe one or two other broken symlinks whose origins I'm not sure of yet. For example, libpng.la should not have existed on your system, if your OS is Mavericks or later.


> It will be nice to have a clean installation that I don’t need to work on. I'm hoping that everything I need will install without error messages, but maybe that is overoptimistic.
> 
> I will avoid using “port select”  on my new installation, until I get the go-ahead that the problems have been researched and sorted. I’m not sure if I am allowed to put my name on some kind of cc list for the ticket, since I’m not intending to work on the problem, but only want to know when it has gone away.

There's no need to avoid using "port select", if you want the functionality it provides. It just doesn't automatically remove its symlinks if you later uninstall the port you had asked "port select" to select. Until we fix that, remember to "port select GROUP none", where GROUP is the name of the select group.

> Possibly I misunderstand, but your earlier emails seem to imply that you feel that the only problem with “select” in MacPorts is the creation of symlinks that are not deleted when uninstalling.

I would concur with that.

> However, I do not believe this is the whole story. For example, my command
>> port installed ‘*python*3*’
> 
> was answered
>> “None of the specified ports is installed”.
> 
> Nevertheless the directory /opt/local/etc/select/python3 remains on my system as useless clutter and there is no obvious way to delete it except manually, which ought to be a “No-no". This has nothing to do with symlinks.

On my system I see the contents of that directory are provided by the following ports:

$ port provides /opt/local/etc/select/python3/*
/opt/local/etc/select/python3/base is provided by: python3_select
/opt/local/etc/select/python3/none is provided by: python3_select
/opt/local/etc/select/python3/python33 is provided by: python33
/opt/local/etc/select/python3/python34 is provided by: python34
/opt/local/etc/select/python3/python35 is provided by: python35

What do you get if you run that "port provides" command?


> A final point, that I hope is not out-of-place. On my system
>> port select —list llvm
> 
> responds with
>> Available versions for llvm:
>> 	mp-llvm-3.5
>> 	none (active)
> and you have told me that “mp-llvm-3.5” is not the name of a port.

That's correct. The name of the port is llvm-3.5. The name of its llvm select group entry is mp-llvm-3.5.

> I do not understand the issues involved and their ramifications, so I may be saying something stupid, but it seems to me, as a naive user, that this reveals a rather bad design fault in “port select”. An "available version" should either be “none” or the true name of an installed port. I realize that resources  to fix things are scarce, but could the ability to choose a random name at least be acknowledged as bad practice, and could a ticket be provided for work to be done so that this behaviour becomes impossible?

I think we don't consider this to be a design fault, but a feature. In other words, it was not a mistake that the select group entry can differ from a port; it was a deliberate decision to allow that. As has been pointed out, we want to be able to select things that are part of macOS and are not provided by a port.

I agree that some of the select group entry names we've chosen are not optimal in the way in which they differ from the name of the port they provide. It might be a pain to fix that at this late date.







More information about the macports-users mailing list