Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

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

Writer Sophia Terry

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}

2

1 Answer

rpm -ivh --force packagename.rpm

to install the package replacing all existing files.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy