On 18.10.19 04:44, Eli Schwartz wrote:
I'm thinking first one installed wins. It also avoids decisions about whether pacman should automatically update alternatives to a higher priority package if it gets installed later.
As long pacman has an easy way to set the priorities, I'm fine with this behavior.
"This behavior" is "do not implement any sort of alternatives priorities at all, do not pass GO, do not collect $200".
Naturally, pacman will have a way to manually select an alternatives provider, but there will be no form of "prioritizing" going on... I'm not sure whether by "easy way to set priorities" you actually mean "easy way to set the final resolved provider".
Well, since the title says "brainstorm", I'll just throw in my thoughts about this: "first wins" feels more "KISS" to me, it's logic is less complex and I think it has the least "surprise potential". It would not break any assumptions about for example /usr/bin/python the user(s) of the system may have made at some point before someone installs an additional "provider" for /usr/bin/python on that system. (Though this kind of assuming is admittedly something one should probably not do? At least with python... other cases may be different.) If the auto-changing the alternative via priority is clearly communicated to the user, that "surprise" would be mitigated somewhat though. But that does not help when there's more than one user on a system and the change was not communicated to all users by the one who installs packages. On the other hand I'm not sure if that's something pacman should care about. I'm leaning towards "That's the sysadmin's job", but others may think otherwise. For me and my use cases it does not matter much if there's some automatic thing or "first wins". As long as pacman informs me about any change it makes and not silently changes an alternative, I'll be happy. The only thing I'd feel strongly about some automatic choosing is, that I think a manual selection should not be changed automagically. For example, if I have python2 and python3 installed, then manually set python to python2 and after that install python4 at some point, python should stay at python2 no matter how high python4's priority is because python2 was selected manually. -- regards, brainpower