Bug 1223986 - conflicting package gets selected during zypper dup
Summary: conflicting package gets selected during zypper dup
Status: RESOLVED INVALID
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: libzypp (show other bugs)
Version: Current
Hardware: x86-64 Linux
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-06 21:06 UTC by Olaf Hering
Modified: 2024-05-29 08:15 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
vlc-beta.zypper.solverTestCase.tar.xz (8.71 MB, application/x-xz)
2024-05-06 21:06 UTC, Olaf Hering
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olaf Hering 2024-05-06 21:06:35 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?
Comment 1 Dominique Leuenberger 2024-05-28 09:42:58 UTC
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
Comment 2 Olaf Hering 2024-05-28 11:43:49 UTC
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?
Comment 3 Michael Schröder 2024-05-28 15:53:43 UTC
No. "Obsoletes: foo" means that this package is the new "foo". It's not "just for a smooth transaction".
Comment 4 Michael Andres 2024-05-28 18:43:39 UTC
Closing it. Package management works as expected.
Comment 5 Michael Schröder 2024-05-29 08:15:20 UTC
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.