Toralf Lund wrote:
As I mentioned earlier, I managed to break the rpm database on my FC3
box quite badly a while back (may have been a result of temporary disk
failure due to system overheat.) Fortunately, it turns out that I have a
fairly accurate list of packages that are supposed to be installed, in
the form of rpm file names - thanks to /var/log/rpmpkgs and its backups.
So how do I recover the database based on this list? I guess I want to
get hold of each file listed and to rpm -i --justdb on it, but is there
some magic yum command or similar that might automate the process? (The
rpms are taken from various different repos, so it's not just a question
of a simple ftp mget + rpm install.)
- Toralf
Tor -
I'm not familiar with that method, but I am sure you can use something
like this:
rpm -qa|xargs rpm -i --justdb
or make a shell script that does a while loop on the text file of the
RPMs that are/should be installed.
'xargs' is a very useful command. It takes stdout and runs it as an
argument to a command. Very useful indeed.
Hope that helps
-dant