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 <div>well these are two packages from centos update tree, but still issue exists.</div><div><br></div>

<div>now i am not able to build package in case of any rpm query in build script.</div><div><br></div><div>[sh]</div><div><br clear="all"><div>kerneldir=/lib/modules/`rpm -q kernel | sed &#39;$!d&#39; | sed &#39;s/kernel-//g&#39;`/build</div>

<div><br></div><div>[/sh]</div><div>above is shell script to find out installed kernel version in chroot, where it throw following error</div><div>[error]</div><div><br></div><div><div>error: cannot open Packages index using db3 - Invalid argument (22)</div>

<div>error: cannot open Packages database in /var/lib/rpm</div></div><div><br></div><div>[/error]</div><div><br></div><div><br></div><div>is there any way to solve this issue or how to find installed kernel version in chroot ?</div>

<br><br></div><div><br>~thanks<br>Vijay.<br>
<br><br><div class="gmail_quote">On Wed, Sep 29, 2010 at 12:22 AM, Panu Matilainen <span dir="ltr">&lt;<a href="mailto:pmatilai@laiskiainen.org">pmatilai@laiskiainen.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On Thu, 16 Sep 2010, Vijay N. Majagaonkar wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; I am running out of strange problem at the time of creating ISO, ISO created<br>
&gt; successfully but it failed at the time of OS installation and this what i<br>
&gt; found in root.log file<br>
&gt;<br>
&gt; I am not able to under stand the what is the problem &quot;cannot open<br>
&gt; Providename index using db3 - Invalid argument (22)&quot;<br>
&gt;<br>
&gt;<br>
&gt; can someone please give me some point or direction to fix this,<br>
<br>
</div>This is the all-important clue:<br>
<div class="im"><br>
rpmdb: /var/lib/rpm/Providename: unsupported hash version: 9<br>
<br>
</div>You&#39;re apparently creating an image for an older distro on a newer one,<br>
and the older RPM / Berkeley DB combo on the installed image doesn&#39;t<br>
support the hash format of the newer BDB from the newer distro (on which<br>
you created the image).<br>
<br>
There&#39;s no general &quot;easy&quot; solution for it I&#39;m afraid. If possible, use an<br>
older distro (of the same era as the one you&#39;re creating the image for) to<br>
create the image. Another possibility might be downgrading the rpmdb<br>
format with db_dump and db_load from suitably versioned db4-utils, but<br>
that gets a bit tricky.<br>
<br>
        - Panu -<br>
<font color="#888888">--<br>
buildsys mailing list<br>
<a href="mailto:buildsys@lists.fedoraproject.org">buildsys@lists.fedoraproject.org</a><br>
<a href="https://admin.fedoraproject.org/mailman/listinfo/buildsys" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/buildsys</a><br>
</font></blockquote></div><br></div>