nasty *.rpmnew buildup on my system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On my system there is a nasty buildup of .rpmnew files.  This is
because the installation of i386 and x86_64 versions of the same
package fight over the config files: one wins and the other creates a
.rpmnew.  And they only differ in timestamp.
  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=128622

I don't have problems with a buildup of .rpmsave or .rpmorig files but
that could happen.
  http://www.redhat.com/archives/rpm-list/2003-May/msg00426.html

To deal with this stupidity, I use the following shell script.  For
each .rpmnew file (found by locate), the file is compared with the
non-rpmnew version.  If the files have identical content (ignoring
permissions and timestamps) the .rpmnew is deleted; otherwise, a diff
is done.

If there is actually a difference, it is a good idea to try to figure
out why and fix it.  One source of differences is customization that
you have done (you don't want this blown away).  Another source is a
change made as part of the update (intended to be an improvement!).
  http://www.redhat.com/archives/fedora-list/2003-December/msg04713.html

# remove .rpmnew files that have content that is the same as the base file

set -u -e

locate '*.rpmnew' |
    while read FS
    do
        F=`expr match "$FS" '\(.*\)\.rpmnew$'`
        if cmp "$F" "$FS"
        then
            echo remove "$FS"
            rm "$FS"
        else
            [ "$?" == 1 ] && diff -u "$F" "$FS" || :
        fi
    done


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux