For some reason, rpm in Fedora Core 6 (and I believe Fedora Core 5 too)
has become overly twitchy about replacing configuration files; a lot of
the time it will write
.rpmnew files instead of just replacing the old
version of the file even if the old file is unchanged and the new and
the old file are completely identical.
While I think this is multiarch stuff in action, I still have to clean it up every so often. I use a little scriptlet for this, usually typed at the command line:
for i in *.rpmnew; do n=$(basename $i .rpmnew) if cmp -s $i $n; then mv -f $i $n else diff -u $n $i fi done
(Yes, this can be done on one line if you're crazy enough. I admit that
I usually turn the if block into either '
diff -u $n $i' or, once
that's shown me nothing important, '
cmp -s $i $n && mv -f $i $n'.
And if it was an actual script, I would have to start making it more
elaborate, with features like a dryrun option.)
At first I thought I had an idea why this was happening, but the more I
look at the
rpm source code and the RPMs involved in my most recent
case, the more confused I get. As far as I can decode from the
source code, this can't happen unless either the actual file on disk
has been changed (which it hasn't), or there's an existing config file
before the package is installed for the first time (not applicable for
package upgrades). It does seem to only involve things that have RPMs
for more than one architecture installed, though, although I haven't
tested that extensively.