On Monday 14 February 2011 18:47:43 Jeff Johnson wrote:
> You are half-way through the conversion.
>
> Presumably you are trying to use rpm-5.3.8 compiled
> with your system db-4.8.x.
I've built rpm 5.3.8 with db 4.7.25 because it was the release provided
internally by rpm 5.2.1 and I tought no conversion pain would be needed:
# ldd /usr/bin/rpm|grep libdb
libdb-4.7.so => /usr/lib/libdb-4.7.so (0x4041a000)
$ more rpm-5.2.1/db/README
Berkeley DB 4.7.25: (May 15, 2008)
This is version 4.7.25 of Berkeley DB from Oracle. To view release and
installation documentation, load the distribution file docs/index.html
into your web browser.
> Comment out the lines with different syntax for the moment.
>
> I can/will look at the db-4.8.x code and find the DB_CONFIG syntax.
>
> (just grep for the keyword in Berkeley DB sources, its
> a quite straightforward parser that can be easily patched.)
The error
rpmdb: /var/lib/rpm/Packages: DB_SECONDARY_BAD: Secondary index inconsistent
with primary error: db3cget:db3.c:1314: dbcursor->get(-30973):
DB_SECONDARY_BAD: Secondary index inconsistent with primary
shows after I've removed DB_CONFIG. I don't know well the internals of
berkeley db but I thought that by using the same db version it wouldn't be
necessary to make steps to upgrade the db apart from the sed trick below. Or
is the rpm 5.2.1 internal db 4.7.25 different from upstream release?
If I grep DB_SECONDARY_BAD in db-4.7.25 sources I get a lot of occurencies,
but don't know what to do then (why should I need to patch system db 4.7.25
and not rpm?)
> Then try
> rpm --rebuilddb -vv
> which will report the maximum header instance. If the maximum
> header instance is ~4Gb, then the header instances aren't
> byte swapped, and a single pipeline'd command needs to
> be run, essentially:
> db48_dump Packages-OLD | sed -e ... | db48_load Packages-NEW
> The sed expression just matches the header instance keys and swaps the
> bytes in the hex dump.
>
> Since its only invertible buyte swapping involved, the same procedure
> applied again will convert back to what rpm-5.2.1 expects.
I think I need some more time to undestand and apply this information and will
let you know, sorry now I'm in hurry, I will try later.
To summarize I think I need to understand why and how should I use DB_CONFIG
(is it up to me as you said in the other mail or do I need to configure it in
some way to fix the upgrade?) and where does the non-compatible syntax come
from if previous rpm used the exact same db version on the current one (is rpm
5.3.8 simply not compatibile with db 4.7?).
Thanks,
Silvan
--
mambaSoft di Calarco Silvan
Web: http://www.mambasoft.it
mambaSoft Store @ http://www.mambastore.it
openmamba GNU/Linux development @ http://www.openmamba.org
______________________________________________________________________
RPM Package Manager http://rpm5.org
Developer Communication List [email protected]