I am installing latest version provided by centos updates. i am using rpm-build 4.4.2.3-20.el5_5.1 and db4 4.3.29-10.el5_5.2 
well these are two packages from centos update tree, but still issue exists.

now i am not able to build package in case of any rpm query in build script.

[sh]

kerneldir=/lib/modules/`rpm -q kernel | sed '$!d' | sed 's/kernel-//g'`/build

[/sh]
above is shell script to find out installed kernel version in chroot, where it throw following error
[error]

error: cannot open Packages index using db3 - Invalid argument (22)
error: cannot open Packages database in /var/lib/rpm

[/error]


is there any way to solve this issue or how to find installed kernel version in chroot ?



~thanks
Vijay.


On Wed, Sep 29, 2010 at 12:22 AM, Panu Matilainen <pmatilai@laiskiainen.org> wrote:
On Thu, 16 Sep 2010, Vijay N. Majagaonkar wrote:

> Hi,
>
> I am running out of strange problem at the time of creating ISO, ISO created
> successfully but it failed at the time of OS installation and this what i
> found in root.log file
>
> I am not able to under stand the what is the problem "cannot open
> Providename index using db3 - Invalid argument (22)"
>
>
> can someone please give me some point or direction to fix this,

This is the all-important clue:

rpmdb: /var/lib/rpm/Providename: unsupported hash version: 9

You're apparently creating an image for an older distro on a newer one,
and the older RPM / Berkeley DB combo on the installed image doesn't
support the hash format of the newer BDB from the newer distro (on which
you created the image).

There's no general "easy" solution for it I'm afraid. If possible, use an
older distro (of the same era as the one you're creating the image for) to
create the image. Another possibility might be downgrading the rpmdb
format with db_dump and db_load from suitably versioned db4-utils, but
that gets a bit tricky.

       - Panu -
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys