Quote:
Originally Posted by rksinghal
I have created a rpm package and 2 version pkg1 and pkg2. I am using Cent OS 7.1.
1. The pkg1 packages libffi.so.5 automatically and ships it with package. It works correctly. It creates following files after installation:
-rwxr-xr-x. 1 root root 30976 Jun 4 2015 <installation path>/lib/libffi.so.5
2. Due to some reason pkg2 is not able to package libffi.so.5 so I need to add it before creating final package. It also works correctly after installation. This creates following files after installation:
lrwxrwxrwx. 1 root root 38 Dec 16 13:12 <installation path>/lib/libffi.so -> <installation path>/lib/libffi.so.5.0.10
lrwxrwxrwx. 1 root root 38 Dec 16 13:12 <installation path>/lib/libffi.so.5 -> <installation path>/lib/libffi.so.5.0.10
-rwxr-xr-x. 1 root root 30976 Dec 13 15:47 <installation path>/lib/libffi.so.5.0.10
I am having problem when I upgrade from pkg1 to pkg2 using rpm -Uvh. After upgrade it deletes libffi.so.5 and due to that new binary is failing. Is there any work around or fix for it?
|
If installing pkg2 alone works, then I'd put something in pkg2 to check for pkg1's existence...and remove it before installation. Or, put that in the installation notes (you don't say what this is/does/how it's distributed/how many people, etc...), and let the users do it. Or...put a post execution script to move/delete/copy files after installation.
Have you tried running "yum update <pkg2 name>", instead of using the bare rpm command?