tl;dr: zypper up throws a “cannot install both…” error when I don’t want to install both; I want to update to the new one and discard the old one.
I’m using SLES 12 (this should not matter, the issue is package management), and trying to enable automatic (“zypper up”) updates for a package I support, let’s call it cli-tools. One of the dependencies is a kernel module called k-module. Because kABI compatibility is only an expectation within a service pack, a different version is needed for each SP. I installed version 2 of cli-tools while on SP4, and then migrated to SP5. You can see with zypper se -s that k-module was installed as a byproduct (“i”):
S | Name | Type | Version | Arch | Repository
---+-------------------------------------------+------------+-------------------------------+--------+----------------------
v | cli-tools | package | 3 | x86_64 | repo
i+ | cli-tools | package | 2 | x86_64 | repo
v | k-module | package | 3 | x86_64 | repo
i | k-module | package | 2 | x86_64 | repo
When I run zypper up it throws:
The following 2 package updates will NOT be installed:
cli-tools k-module
When I run zypper up cli-tools it says:
Problem: cli-tools-3 requires k-module = source.version_4.12.14_122.20, but this requirement cannot be provided
uninstallable providers: k-module-source.version_4.12.14_122.20-3[repo]
When I run zypper up k-module it throws:
Problem: cannot install both k-module-source.version_4.12.14_95.51-2.x86_64 and k-module-source.version_4.12.14_122.20-3.x86_64
Solution 1: Following actions will be done:
replacement of k-module-source.version_4.12.14_95.51-2.x86_64 with k-module-source.version_4.12.14_122.20-3.x86_64
deinstallation of k-module-source.version_4.12.14_95.51-2.x86_64
This is bizarre. I don’t want to install both of them: I want to replace version 2 with version 3. Indeed, if I select option 1, that’s exactly what happens: the new version gets installed, the old one deleted. But why can’t this be accomplished with just a simple zypper up
? Any advice?
(Crossposted with https://stackoverflow.com/questions/61978623/zypper-up-throws-problem-cannot-install-both, will update either thread if an answer is provided.)