uninstalling a selected port ...
Peter.Danecek at bo.ingv.it
Fri Feb 28 07:18:56 PST 2014
[Sorry, I realise I send my replies off-list]
On 28 Feb 2014, at 15:38, Clemens Lang <cal at macports.org> wrote:
>> I believe it is consistent. As I understand it, the simlinks created by
>> "port select" are not *owned* by the selected port. Since the port
>> itself does not maintain these simlinks (but rather 'port select' does),
>> there are good arguments to be made that the port should _not_ own
>> simlinks created by select. As a result, uninstalling that port should
>> not touch those simlinks. This results in the errors you saw.
> That's correct. However, the symlinks are currently not owned by the corresponding *_select port either, which they probably should and which would solve this problem to some extent, because uninstalling the *_select port would just remove the symlinks.
Give ownership of the symlink to the *_select port probably makes sense, but would not resolve the described problem, right?
> Of course we could also add a check to MacPorts that would somehow notice that you're currently deactivating a port that's currently selected, but that wouldn't be easy, because updates of a port also deactivate (and later re-activate) it and shouldn't destroy your selection.
Okay, so leaving the pointer to the deactivated port makes sense to keep it valid after reactivation.
But would be a simple solution to make it possible to set the a new version of the port even in the described case, i.e. overwrite the symlink when requested by the user (without -f flag, no need to remove the symlink before). This operation should be always possible, independent of the fact that some port is installed or not.
The other thing is, if this pointer is really set to an deactivated/uninstalled port, which (see above) we judge is a valid state, this should be reported to the user. I the concrete case:
sudo port select --list postgresql
Available versions for postgresql:
Active version set to / Currently not available versions for postgresql:
Or some similar output.
This would imply the ticket would be compiled against … (well) *_select, the select port group ???
> I was actually planning on registering the created symlinks to the *_select ports for a while now so trace mode can reliably hide stuff created by the select feature while building (because the selection should never affect how a port builds).
> Clemens Lang
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1762 bytes
Desc: not available
More information about the macports-users