RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Eliminating --initdb

From: Thomas Lotterer <thomas+rpm5@lotterer.net>
Date: Mon 30 Jul 2007 - 13:44:12 CEST
Message-Id: <46ADEA23.49C7.007A.0@lotterer.net>
On Sunday, 29. July 2007 at 9:28 pm, Jeff Johnson wrote:
> Shall we finally eliminate the option?
> 
Please keep. I recently succeeded with my personal BDB example case
(will post details of my failures later) but one issue remains. It seems
to me all the locking stuff does not work reliably for DB_CREATE. If
multiple processes try this simultaneously then damage is done. The
bottom line for me is to try using BDB in a way where only one piece of
code actually initializes the database. And my constant goal of
reproducibility prefers explicit action.

IMHO the best solution would be to remove DB_CREATE from all
db(env)->open but the single one called by "rpm --initdb".

All other use cases, whether rpm or 3rd party applications, attempting
to access a database which does not yet exists should bail out.
Easy to implement, document and understand. No magic. No special cases.

-- 
http://thomas.lotterer.net
Received on Mon Jul 30 13:45:01 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.