RPM Community Forums

Mailing List Message of <rpm-users>

Re: About the consistency of /var/lib/rpm/__db.00?

From: Marc MERLIN <marc_rpm@merlins.org>
Date: Tue 25 May 2010 - 19:00:46 CEST
Message-ID: <20100525170046.GJ6064@merlins.org>
On Fri, May 21, 2010 at 07:52:23PM -0700, Marc MERLIN wrote:
> On Fri, May 21, 2010 at 08:38:23PM -0400, Jeff Johnson wrote:
> > > So running most rpm versions from this century :) creates
> > > /var/lib/rpm/__db.00? when accessing the rpm dbs.
> > > 
> > > My understanding is that they are a temporary index created by the DB
> > > libraries and I know they get recreated as needed.
> > > 
> > 
> > Nope. There are (at least) 3 RPM user visible uses of __db* files, none of them
> > "temporary" or "index":
> > 	1) a version stamp
> > 	2) names of locks (and with thread_count, "stale lock" registration
> > 	for clean-up after exceptional conditions like reboot and segfault
> > 	and programmer error). Note "names", not the locks themselves.
> > 	3) data caching

Ok, I'm working on this some more because this _db* files really need to die
for us.
As you know 
1) older rpms (much older) ran fine without having to create them for any
   rpm operation.
2) rpm -q as root creates them but rpm -q as a user doesn't.

My questions:
1) it is the db library that is creating them, right?
2) can't it be told to stop making when it's called?
3) rpm -q as a user doesn't create the lock/cache files and needlessly
   creates them when it's root. Can't rpm be told not to make them at 
   all for at least read only operations?

"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/  
Received on Tue May 25 19:01:07 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.