Thursday, 25 January 2018

linux - How to force `yum reinstall` to overwrite changed files in a `/var` sub-directory?

I have a software package[1] that is already being used by multiple users.
Its RPM is created with Cmake.


For historical reasons, the software package installs some files in a subdirectory of /opt.
Consequently, if any of these files is changed, Cmake assumes that since the changed file resides in /opt, it is a configuration file (AFAIK, as only config files should go under /opt), and if a yum reinstall of the package is performed, the changed file is not overwritten.


The obvious solution is to install to a non /opt location, e.g., to /usr.
This would work for new versions, but as I said, I have a user-base where /opt is used.


Any ideas on how to force yum reinstall to overwrite the changed files in the /opt sub-directory?





[1] OS: CentOS/RedHat 7.{3|4|6}

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...