Restoring rpm packages

Chris Rouch chris.rouch at gmail.com
Wed Mar 23 15:58:38 UTC 2005


On Tue, 15 Mar 2005 18:05:12 +0000, Timothy Murphy
<tim at birdsnest.maths.tcd.ie> wrote:
> On Tue 15 Mar 2005 00:36, Matthew Miller wrote:
> 
> > > In any case, what I would like to do is to verify all the rpm packages
> > > on the system, and to re-install any that are damaged.
> > > Is that possible?
> > > If it is, is there any script that would simplify the task?
> >
> > Try 'rpm -Va', to verify all installed packages. (Look at the rpm man page
> > to see what the resulting codes mean.) You'll get some "false positives"
> > from config files, etc., which change in the course of normal events.
> 
> Thanks for your response.
> I knew of the "rpm -V" command, though it didn't occur to me
> that one could combine it with "-a";
> my idea was just to run through all the packages listed in /var/log/rpmpkgs .
> 
> However, I ran "rpm -Va" on my laptop last night
> (capturing the response with script)
> but I am not really sure how to use the result.
> For one thing, it would be tedious to find all the packages
> in which the files mention occur.
> 
> As I said, it would be nice to have a script "CheckMyPackages"
> which would just go through installed packages
> running "rpm -Uvh --force" for those that have been changed.
> 

I had a similar problem with the hard disk getting randomly corrupted
on my laptop (Compaq Armada M700). It turned out to be because I'd
switched DMA on, which the disk didn't like.

Before I discovered this, I wrote the attached script which emails a
list of rpms for which verify failed. It's then up to you to
re-install or ignore. The script allows you to cache 'expected
failures', so that you can e.g. ignore a changed /etc/passwd. I hope
it is self explanatory.

NB prelink causes rpm -V to fail, so you will get a lot of false positives.

Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: missing.sh
Type: text/x-sh
Size: 827 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050323/4c28536a/attachment-0001.bin>


More information about the fedora-list mailing list