[Yum] how to 'refresh' packages with yum?

Konstantin Antselovich konstantin at antselovich.com
Fri Aug 18 05:00:18 UTC 2006


Hi list, first time here

I've got a part of my working system trashed due to the file system
corruption.
Large portion of /usr is gone.

I do have  rpm and yum working and I can produce a list of broken packages.
How do I 'refresh' (like rpm -F package.rpm) a list of packages with yum?

At this moment, I am thinking about writing a perl script because I don't
want to do a full reinstall.


# pseudocode
foreach file in the list_of_installed_pkgs {
    if ( package is broken "rpm -qV"  &&  packaege in not 'local' )
        rpm -e --nodeps $package; yum install $package
}


That's highly inefficient, I know.   Before I proceed with my script,
I’d like to ask yum gurus is there any better solution?

TIA,
Konstantin


-- 
Konstantin Antselovich
konstantin at antselovich.com





More information about the Yum mailing list