Ainsi parlait Pixel :
> Michael Reinsch <[EMAIL PROTECTED]> writes:
> > Hi!
> >
> > On Mon, 10 Sep 2001 04:10:48 Brian J. Murrell wrote:
> > > As reported here a while ago, rpm is creating *.rpmnew files for any
> > > config file that exists, whether it was modified since package
> > > installation or not.
> >
> > Have you tried rebuildind your rpm database?
>
> yes, that should fix (it did for gc here).
To correct .rpmnew proliferation, you can also use this small script that 
removes unnecessary files, and display name of really modified ones:
#!/bin/bash
# Find files which really change

if [ $# != 2 ] ; then
        echo "Usage: `basename $0` directory suffix"
        exit 1
fi

if [ ! -d "$1" ] ; then
        echo "Directory $1 not found"
        exit 1
fi

for new_file in `find $1 -name *.$2`; do
    old_file=${new_file/.$2}
    change=`diff $old_file $new_file`
    if [ -n "$change" ]; then
        echo "$old_file has changed"
    else
        rm -f $new_file
    fi
done
-- 
Guillaume Rousse <[EMAIL PROTECTED]>
GPG key http://lis.snv.jussieu.fr/~rousse/gpgkey.html

Reply via email to