I use yum to update my Fedora. After a huge update, I got many .rpmnew
and .rpmsave
files. I could understand if I had modified these files. But I'm sure that I didn't edit these files.
What should I do with these files? What will happen at the next update?
Here's a sample of these files:
/usr/share/texmf-var/fonts/map/dvipdfm/updmap/dvipdfm_dl14.map.rpmnew
/usr/share/texmf-var/fonts/map/dvipdfm/updmap/dvipdfm_dl14.map.rpmsave
Thanks
There are two cases:
%config
tag), you've edited the file afterwards and you now update the rpm then the new config file (from the newer rpm) will replace your old config file (i.e. become the active file). The latter will be renamed with the.rpmsave
suffix.%config(noreplace)
tag), you've edited the file afterwards and you now update the rpm then your old config file will stay in place (i.e. stay active) and the new config file (from the newer rpm) will be copied to disk with the.rpmnew
suffix.See e.g. this table for all the details.
In both cases you or some program has edited the config file(s) and that's why you see the
.rpmsave
/.rpmnew
files after the upgrade because rpm will upgrade config files silently and without backup files if the local file is untouched.After a system upgrade it is a good idea to scan your filesystem for these files and make sure that correct config files are active and maybe merge the new contents from the .rpmnew files into the production files. You can remove the
.rpmsave
and.rpmnew
files when you're done.Sometimes the package manager just gets a bit confused over what constitutes a modified file or not. Usually it's because some program or another has made modifications (especially those TeX map files).
There's two approaches that I use when dealing with these sorts of files, depending on my mood, the criticality of the system, and how much I know about the file in question:
diff -u <current file> <new/save version>
) between the various versions of the file, examine the output and integrate the necessary changes between the versions to bring everything up to speed, then delete the save/new files when I'm happy with things. A lot more work (although small shell scripts to find and diff the files help) but pretty much guaranteed not to break anything unless I muck up the merge.