RPM Community Forums

Mailing List Message of <rpm-users>

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

From: Jeff Johnson <n3npq@mac.com>
Date: Tue 25 May 2010 - 20:59:34 CEST
Message-id: <DD7ED0FB-8C46-4DA5-9AFA-9FBEA851FB82@mac.com>

On May 25, 2010, at 2:02 PM, Jeff Johnson wrote:
> There are an immense number of "off" buttons in RPM, none
> of them very useful or correct, but I can/will tell you
> what to do.

OK I have a checkout from @rpm5.org onto the tag
and here's the gory (untested, I'm just reading code) details
about how to make __db* files go away with RPM macro configuration.

I suggest the KISS approach of shell wrapping
	rm -f /var/lib/rpm/__db*
files becuase none of rpm-4.04 is maintable or fixable or anything else.
JMHO, YMMV, everyone's does.

The basic configuration details are attributes while opening
"tables" (what Berkeley DB calls "databases") are resident in
/usr/lib/rpm/macros. Change the configuration to taste.

E.g. I'm referring to lines in /usr/lib/rpm/macros that
look like
	%__dbi_rebuild                  nofsync !log !txn !cdb
	%__dbi_transient                %{__dbi_rebuild} temporary private
	%__dbi_perms                    perms=0644
Note the syntax:
	1) attributes are enabled(or disabled) like
	of (for disabling)
	2) there are KEY=VALUE parameters like

1) "private"
	This disables _ALL_ locking by Berkeley DB,

2) "usedbenv"
	This disables using a Berkeley DB environment _WHATSOEVER_.

3) "cachesize=nnnMb"
	This is one (of several) Berkeley DB tunables related to
	"not happening" I/O and the size of __db* files. Some of
	the others are "nofsync", "mp_mmapsize", "mp_size", and "pagesize".
	I personally haven't seen any use (in rpm-4.0.x) of changing
	any of the above, but I know quite well what to do with the above
	in rpm-5.3.

4) "verify"
	This enables calling (*DB->verify) (which I believe also forces
	__db* removal but these are dim memories) when a rpmdb is closed.

5) "teardown"
	This (IIRC) will remove __db* files at end of every RPM invocation.

hth	Have fun! All of the above turned out Not To Be The Right Thing To Do.

73 de Jeff

Received on Tue May 25 21:00:13 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.