I'm writing a spec file to replace a yum package with one from our own repository. The new package will be a drop-in replacement for the original.
I thought the best way to do it would be to give the spec file an identical Conflicts
and Provides
like one might do with a typical Arch Linux package:
Name: vncsnapshot-png
Provides: vncsnapshot
Conflicts: vncsnapshot
This seemed to work, and the package can be installed/downgraded/upgraded with no issue. However, reinstallations fail:
Loaded plugins: security
Setting up Reinstall Process
Resolving Dependencies
--> Running transaction check
---> Package vncsnapshot-png.x86_64 0:1.3-1.el6 will be reinstalled
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================
Reinstalling:
vncsnapshot-png x86_64 1.3-1.el6 sv.repo 35 k
Transaction Summary
===============================================================================================================================================================
Reinstall 1 Package(s)
Total download size: 35 k
Installed size: 72 k
Is this ok [y/N]: y
Downloading Packages:
vncsnapshot-png-1.3-1.el6.x86_64.rpm | 35 kB 00:00
Running rpm_check_debug
ERROR with rpm_check_debug vs depsolve:
vncsnapshot conflicts with vncsnapshot-png-1.3-1.el6.x86_64
vncsnapshot conflicts with vncsnapshot-png-1.3-1.el6.x86_64
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
vncsnapshot-png-1.3-1.el6.x86_64 has installed conflicts vncsnapshot: vncsnapshot-png-1.3-1.el6.x86_64
Your transaction was saved, rerun it with:
yum load-transaction /tmp/yum_save_tx-2016-02-18-12-18dAjmpb.yumtx
Is there a way to mark the package as conflicting with the original (i.e. can't be installed at the same time) while providing the original (i.e. a drop-in replacement), without running into this problem?