Issue
tldr; Would it be possible to force RPM to examine physical files on disk for changes when 'upgrading' a package with -U?
Current situation:
- install rpm a1
- an application modifies files from a1.
rpm -V a
shows the files being modified.- install rpm a2 (with -U: Upgrade). This rpm contains mostly the same files from a1 (it's the next version, only some files are changed)
rpm -V a
shows that only some files are not restored to what was in the a2 rpm.
My best guess is that rpm compares only the md5 of the files from the already installed package a1 against files from package a2, and only when an md5 does not match it will look at the physical file. How would i force rpm to look at all files, as it does with -V ?
Example output of modified files:
/ # rpm -V a
missing c /xxx/config/xyz.ini
S.5....T c /xxx/config/foo.xml
S.5....T c /xxx/config/firmware/xx.cfw
S.5....T c /xxx/config/bar.txt
S.5....T c /xxx/config/bar.xml
rpm -qc does list them.
Solution
The behavior you describe is the correct behavior for files marked as %config(noreplace)
in the RPM spec file. As that markeing indicates to rpm that the file is intended to be modified by the user/sysadmin and should not be replaced automatically on package upgrades.
I would check whether those files are listed that way in the spec file and whether or not that is the correct marking for those files.
Answered By - Etan Reisner Answer Checked By - Pedro (WPSolving Volunteer)