rpm -qa | while read p ; do yum <whatever> $p ; done rpm -qa | xargs yum <whatever>
Replace <whatever> with whatever it takes to force yum to reinstall.
Once you get it started, go have a good long nap:-)
It probably wont work, because there's a ton of *-devel packages that need to be installed when rebuilding, which are probably not on the system right now.
If you always have your user home dirs on a seperate partition/disk, it's no big deal to reinstall. Just make sure you don't accidentally overwrite the user disk :-)
-- Morten