Open voxik opened 3 months ago
There's no easy way to implement this due to libsolv being a SAT solver that translates dependencies to rules on packages. With this translation all ordering information is gone. So the implementation would need to map the rule back to the originating dependency/dependencies.
I'm not sure if it's such a good idea, though, as it implies that there is always a preferred choice.
There's no easy way to implement this due to libsolv being a SAT solver that translates dependencies to rules on packages. With this translation all ordering information is gone. So the implementation would need to map the rule back to the originating dependency/dependencies.
If libsolv can leverage Suggests
as a hint, this in my naive view is not really different.
I'm not sure if it's such a good idea, though, as it implies that there is always a preferred choice.
Why there should not be?
In my specific example, I really cannot judge why cage
should be preferred. There likely is some metric baked into the solver, but that is not user transparent. Is that dependency chain length? But why that should be preferable to download size?
Looking into Fedora, there are 56 packages using the boolean syntax. From these 56, there are 8 which combines this with Sugests
and one which is question, being reason for this RFE. And I doubt the Suggest
hint is widely known.
And I doubt the
Suggest
hint is widely known.
Not mentioning that hinting the preferred package is not the original purpose of Suggests
. It certainly is not capture in RPM documentation.
I am coming here from https://bugzilla.redhat.com/show_bug.cgi?id=2295752. The issue is that given
Requires: (weston or cage or kwin-wayland or mutter or gnome-kiosk)
, it would be natural (due to to commonly used "short-circuit" evaluation in programing languages) to assumeweston
is the preferred choice, but in realitycage
is installed. I think this should change.