'RPM merging and upgrading
I have 2 rpms rpm-abc , rpm-xyz . rpm-xyz is dependent on rpm-abc and depdendency is rpm-xyz can't be installed if there is no rpm-abc.
rpm-abc creates a directory abc in my system and rpm-xyz creates a directory xyz.
Now we merged rpm-xyz to rpm-abc.
Now i am having below issue. On my system i have installed rpm-abc and rpm-xyz. Now i wanted to update it to merged rpm-abc. so I have done it through rpm -Uvh rpm-abc. This is succesfull. But when i do rpm -aq|grep rpm-xyz it shows rpm-xyz is still on system.
So in spec file of rpm-abc i have added below entry.
Obsoletes: rpm-xyz.
As per my understanding when we upgrade the rpm-abc rpm-xyz get's unistalled. Now i am having different issue with this. As said earlier abc and xyz directories when i have installed rpm-abc and rpm-xyz directories respectively.
Now when i have done rpm -Uvh rpm-abc it uninstalls the rpm-xyz As part of uninstallation it is also removing xyz directory which should not happen.
Now i am searching for a way that when i do rpm -Uvh rpm-abc it should uninstall rpm-xyz by skipping the removal of directory xyz. Looking for some help here mates?
Solution 1:[1]
Did you move the line:
%files
%dir xyz
from rpm-xyz to rpm-abc? That should do it.
BTW There is guidelines how to do the merging more precisely: https://docs.fedoraproject.org/en-US/packaging-guidelines/#renaming-or-replacing-existing-packages
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | msuchy |
