2
votes

I develop a software which is distributed and installed via rpm. During install, I copy some binaries to a destination directory.

When performing rpm upgrade, I'd like the old binaries not to be deleted, and that the new ones will be added as is.

Is there an rpm built-in way to do so? I'd really like to avoid scripting in order to resolve that...

EDIT:

The above binaries were listed in @files section.

1

1 Answers

0
votes

If you are manually copying the files to some directory (in %post for example) then yum/rpm doesn't know anything about them and can't remove them.

If you have them listed in the %files section (i.e. copying them to the right place under buildroot during `%install) then no, I do not believe you can have rpm leave files not listed by the new package on the system after upgrading to a newer version of the package which does not contain those files.

It might be possible to play with marking them as %config files and then "modifying" them so that rpm won't remove them but it might still rename them and I don't know if this will actually work.