I want to create rpm A, my requirement here is that whenever I install rpm A, It will replace some files which are part of installed rpm B.
for this in debian we used
Provides: pkg C
Conflicts: pkg C
Replaces: pkg C
Replacing whole packages, forcing their removal.
How can I do this in rpm spec file.
There are 2 solutions.
Overlapping is not in supported rpm spec, but we can use commandline option rpm A --replacefile
.
Use Obsoletes:
in RPM A spec file to remove older package or conflict packages and add Provides:
in RPM A to make RPM B happy.
Note: for option 2 rpm -i RPM A --> will not obsoletes packages. we have to use yum install RPM A or rpm -U RPM A