openSUSE/libzypp

zypp is too eager installing packages that have Obsoletes tags

jengelh opened this issue · 1 comments

Observed with libzypp 17.28.8/zypper 1.14.50 (tumbleweed du jour):

# zypper -R /test in --no-recommends pipewire-pulseaudio
The following 454 NEW packages are going to be installed:
[...]

Expected:

The following 48 NEW packages are going to be installed:

The details are on https://bugzilla.opensuse.org/show_bug.cgi?id=1194264 , including the multimegabyte solver test case dump.

Summary:

  • alsa-plugins-pulse has a dependency on pulseaudio.
  • user requests installation of pipewire-pulseaudio, which has a Conflicts: pulseaudio
  • alsa-plugins-pulse, pulseaudio has to be thrown out for any solution (other than the "Do nothing" solution)
  • zypp notices that patterns-microos-desktop-common.spec has a Obsoletes: alsa-plugins-pulse < 1.3 and thus seems to prefer selecting a solution which installs patterns-microos-desktop-common over a solution which does not install that package.

I believe this is the wrong thing to do, because the microos spec does not have a Provides: alsa-plugins-pulse unlike true "replacement" packages (Obsoletes: X Provides: X).

I believe this is the wrong thing to do, because the microos spec does not have a Provides: alsa-plugins-pulse unlike true "replacement" packages (Obsoletes: X Provides: X).

No. From the dependencies POV the Obsoletes is the indicator for being a replacement, an update candidate, a successor or however you want to call it. The Provides is just a hint when pruning a set of replacement candidates. Packages also providing the old name are preferred.

But let's continue in bugzilla...