solver: Highest requirer count over provider_priority
Considering the higher requirer count over priority causes conflicts where a package has many provides
.
This has been observed in the case of pipewire-pulse
replacing pulseaudio
because it also provides pulseaudio-alsa
.
- https://gitlab.alpinelinux.org/alpine/aports/-/blob/df9236a95b5db68764a945b6c38a1a5e5d99d51d/community/pipewire/APKBUILD#L49-50
- https://gitlab.alpinelinux.org/alpine/aports/-/blob/df9236a95b5db68764a945b6c38a1a5e5d99d51d/community/pulseaudio/APKBUILD#L11
Source:
- https://gitlab.alpinelinux.org/alpine/apk-tools/-/blob/f7143c1766ae59489ac922e890ffe6d4a61c3b2d/src/solver.c#L600-605
- https://gitlab.alpinelinux.org/alpine/apk-tools/-/blob/f7143c1766ae59489ac922e890ffe6d4a61c3b2d/src/solver.c#L646-651
Simply taking the provider priority over requirer count solves this problem.
Edited by Alex Denes