File conflict with the old installed rpm package while installing new package
when I am trying to install my rpm application package (2.5-0.1.12 -- Version and revision) If any older version is installed I am getting below file conflict error.
file /opt/compname/product/application.jar from install of comp-prod-2.2-0.1.12 conflicts with file from package comp-prod-2.5-0.1.12 I am getting the above error for jar file and desktop file between older and newer versions. But when i use update command its overwriting the older version and installing new. Should i do anything to resolve this in my spec file. Please tell me why this conflict is coming and how to resolve this? |
Quote:
Quote:
* BTW your version numbering seems odd. Sure you can build and ship a new %{minor} version (on upstream release?) but (especially when patching) the %{build} should start at the lowest incremented number like -0.0.1 and not 12. For example 2.2-0.1.12 leads to 2.2-0.1.13 if patched or to 2.5-0.1.1 if upstream updates it. |
installer upgrade using RPM
RPM is taking care of installing older version and also same version scenario.
If I do update instead of installing new version when old is existing then it updates the package so no problem here. But When I try to install a new version when an older version exists RPM installs the new version separately thus two versions will exist. I would like to stop the new version installation when an older exists in my spec file by checking in %pre section. How can I know that rpm -ivh is called or rpm -Uvh is called in my spec file? if [ "$1" = "1" ]; then echo Perform tasks to prepare for the initial installation elif [ "$1" = "2" ]; then echo You already have old version Please use -U to upgrade. fi "$1" = "2" true for both new installation when old is present and for upgrade. Please let me know how to solve this. |
Quote:
|
All times are GMT -5. The time now is 12:36 PM. |