On Jun 9, 2007, at 1:54 PM, Frank Fegert wrote:
Jeff Johnson wrote:
So rpm-4.4.7 works reliably and rpm-4.4.9 does not.
At least as far as i used it. AIX is too quirky to completely
rule out more surprises ;-)
There have been few changes. Berkeley DB is connected
to rpm in rpmdb/db3.c.
I just ran
cvs diff -r rpm-4_4_7-release -r rpm-4_4_9-release db3.c
and the output is at
http://wraptastic.org/pub/jbj/db3.c-447-449.diff
for reference.
Can you try
rm -f /var/lib/rpm/__db*
rpm -qa
as non-root?
Running "rpm -qa" as non-root avoids dbenv cache/lock issues and
(if the command works) you're likely close to functional rpm-4.4.9.
You're right, as non-root 'rpm -qa' seems to work:
Good you're close to rpm-4.4.9 then.
[EMAIL PROTECTED]:~
$ rpm -qa
[...] $Packagelist [...]
[EMAIL PROTECTED]:~
$ echo $?
0
This is the automated recovery kicking in, the major change
between 4.4.7 and 4.4.9. If necessary, replacing rpmdb/db3.c
in rpm-4.4.9 with the version in 4.4.7 will be one of the first
things to try. The two files should be close to being
interchangeable.
Try rpm --verifydb to do the same manually
I tried using rpmdb/db3.c from 4.4.7, but is seems to get into
the same error, though not repeatedly like the original one from
4.4.9:
bash-3.2# rpm -vv --rebuilddb
D: rebuilding database /var/opt/afw/rpm/db into /var/opt/afw/rpm/
dbrebuilddb.299126
D: creating directory /var/opt/afw/rpm/dbrebuilddb.299126
D: opening old database with dbapi 3
D: opening db environment /var/opt/afw/rpm/db/Packages
create:cdb:mpool
rpmdb: unable to initialize mutex: Invalid argument
rpmdb: unable to destroy mutex: Invalid argument
rpmdb: PANIC: Invalid argument
rpmdb: unable to join the environment
error: db4 error(-30975) from dbenv->open: DB_RUNRECOVERY: Fatal
error, run database recovery
D: opening db index /var/opt/afw/rpm/db/Packages rdonly
mode=0x0
error: cannot open Packages index using db3 - (-30975)
D: removing directory /var/opt/afw/rpm/dbrebuilddb.299126
Does this help or is there any more information i can provide?
You can likely go back to last-known-good by replacing
these directories
db
db3
and these files
rpmdb/dbconfig.c
rpmdb/db3.c
in a 4.4.9 build from the same in 4.4.7.
rpm does not care much what BerkeleyDB is being used.
(aside)
Note that 4.4.9 has changed the type of certain indices
from hash to btree (and rpm-4_5 is in the process of changing
back in order to achieve "everywhere compatible").
rpm-4.4.9 as delivered does not care btree or hash, 4.4.7 does care.
For "rpm -qa" testing (gud enuf) edit macros.in, look for this line
# "Packages" should have shared/exclusive fcntl(2) lock using
"lockdbfd".
%_dbi_config_Packages %{_dbi_htconfig} lockdbfd
and make sure it is _dbi_htconfig (the 4.4.7 way) rather than
_dbi_btconfig (the 4.4.9 way).
There are more details at <[EMAIL PROTECTED]>, and the
change is not important, just something to be aware of.
DB_RUNRECOVERY is usually a failure of locking and has nothing
to do with hash <-> btree.
So changing locking to, say, fcntl locking, or replacing with last-
known-good
Berekely DB, are the next likeliest useful steps to rpm-4.4..9 success.
73 de Jeff
______________________________________________________________________
RPM Package Manager http://rpm5.org
Developer Communication List rpm-devel@rpm5.org