Bugzilla – Bug 1223986
conflicting package gets selected during zypper dup
Last modified: 2024-05-29 08:15:20 UTC
Created attachment 874710 [details] vlc-beta.zypper.solverTestCase.tar.xz There is a pkg named "vlc-beta", which is supposed to be installed only if explicitly requested, like 'zypper in vlc-beta'. There are Conflict tags in 'vlc-beta' for this purpose. The Obsolete tags in 'vlc-beta' are supposed to wipe all subpackages from the ordinary 'vlc' pkg, in case 'vlc-beta' is installed either manually or via zypper. Doing "zypper dup -l --no-recommends" will replace rpms from pkg 'vlc' with 'vlc-beta', which is unexpected. I just noticed this also happens in Leap now. What Conflicts/Obsoletes/Provides tags are actually required in 'vlc-beta.spec' to make sure it does not get selected?
The error is in 'Obsoletes' If pkg B obsoleted pkg A, then B is always picked 'to step in place of A'. Packaging bug (on PM. the Videolan repository does not have this obsoleted in the package) in your case, you do not want to have the obsoletes in vlc-beta
Provides is for what the tag name suggests. Obsoletes is just for a smooth transaction because rpm silently deletes the listed packages. Conflicts is to prevent accident installation. But Obsoletes will do what it does in case a package is installed anyway. Does our package management confuse the meaning of those tags?
No. "Obsoletes: foo" means that this package is the new "foo". It's not "just for a smooth transaction".
Closing it. Package management works as expected.
Regarding your question about the tags to use: if it is an alternative, just use a conflict without obsoletes. The software stack will then 1) not automatically switch to the alternative, and 2) will ask the user if it has to switch because of some dependency.