dan wrote:
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.
Yes, but won't I need the actual rpm files before I can do that?
Maybe I wasn't very clear on this, but the way I see it, the main
problem is not to find out what rpm commands to use, but to obtain the
files they want as input. I haven't kept copies of everything I've
downloaded, and the packages came from various different sources
(although I generally take add-ons from large repositories like Fedora
Extras or Freshrpms) so finding the correct version of each and every
rpm file looks like lot of work ;-(
'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
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list