How does --rebuilddb work when the db is completely unreadable?

John Walker johnwalker0 at gmail.com
Fri Jan 20 18:21:34 UTC 2017


>> If anyone can give me any insight about how rpm rebuilds its database,
or point me to
>> relevant portions of the source, I would appreciate it. ?

> It reads the data records, ignoring any indexes, and creates a new
> database from scratch.  While reading the data records, it discards
> those that fail basic sanity checks.

I'm new to rpm internals.  When you say it reads the data records, which
data records do you mean?  Records from the berkley database named
"Packages?"  Records from several of the databases in the rpm database
directory?  Something else entirely?

I feel like I'm misunderstanding something here, because if a rebuild must
be able to read records from the current database, it wouldn't do much good
if the current database is unreadable, however, I have found that rpm
--rebuilddb does work when the current database is unreadable, at least in
one limited situation.  (db5-based version of rpm trying to use files from
a db4-based version of rpm.)

What do you mean be ignoring indexes?  (These don't sound like indexes in
the SQL sense.)

Thanks!

-John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20170120/342d56c1/attachment.html>


More information about the Rpm-list mailing list