rpm db rebuild question

Ben Scott dragonhawk at gmail.com
Mon Nov 12 18:59:53 EST 2007


On Nov 12, 2007 1:58 PM,  <t.littlefield at comcast.net> wrote:
> rpm --reubuilddb
>
> Which does run...  the end result is 121 packages in the db.
> One of the files --rebuilddb pulls from appears to have gotten pooched.

  Ouch.  That's not good.  There's often little you can do in that
case.  If things are that far gone, it often means there is no data
left to rebuild from.  So "rebuilding" isn't your issue, so much as
the lack of anything to rebuild from.

> If anyone on the list can supply a little rpm black magic to recover the
> packages that are installed ...

  Take a look at your /var/log/rpmpkgs* files (assuming they exist).
You maybe have an older one with a more complete package list.  If so,
make a copy ASAP (that file gets automatically overwritten as the
package set changes).

  Now you have a list of packages that are/were installed.  You can
feed that into rpm to repopulate the RPM database.  You can use the
"--justdb" switch, which tells RPM to just update the database without
actually changing anything else on the system.  (Alternatively, you
can actually reinstall all the files, but that will likely be messy
for other reasons.)  Chances are things will be a little strange, but
it's your only option, short of re-installing the distro from scratch.

-- Ben


More information about the gnhlug-discuss mailing list