When multiple packages provide the same soname (e.g. libglvnd and
mesa both providing libEGL.so.1), compareCandidates sorted them by
version number. This is meaningless across different package names —
"26.0.3" vs "1.7.0" says nothing about which is the better provider.
The result was that mesa always won on version, silently pulling in
the wrong provider and causing path conflicts at activation.
Now version comparison only applies to same-name candidates (upgrade
selection). Cross-package providers are ranked by repo priority,
with genuine ties surfaced as ambiguity errors.
Also updates sameRank to detect ambiguity between different-named
providers at the same priority, rather than hiding it behind
meaningless version comparison.
Tests:
- Cross-package providers, different priority -> higher-priority wins
- Cross-package providers, same priority -> ConflictingProvisions