corrupt rpmdb in mock-chroot

Dennis Gilmore dennis at ausil.us
Mon Jun 2 13:25:39 UTC 2008


On Monday 02 June 2008, Paul B Schroeder wrote:
> On Sat, 2008-05-31 at 22:16 -0400, Jon Stanley wrote:
> > On Sat, May 31, 2008 at 7:04 PM, Paul B Schroeder
> >
> > <paul.schroeder at bluecoat.com> wrote:
> > > Rebuilding the rpm database seems to fix this, but it's a pain to be
> > > sure.  Any ideas as to why I'm seeing this corruption when creating an
> > > i386 mock chroot from a x86_64 system?
> >
> > This is normal and expected.  You created the rpmdb with x86_64 rpm,
> > and are accessing it with i386 rpm.  The Berkeley DB format is
> > different based on the arch of the creating machine, therefore
> > generates the database differently on the two platforms.  If I plan on
> > doing anything in a chroot (especially a non-native arch one) other
> > than building a SRPM, the first thing that happens is to rm -f
> > /var/lib/rpm/__db*.  Don't worry, this got me the first time too (and
> > is fatal to a pungi compose) :)
>
> Ah..  I see..  I would think there would be some way to tell it to
> create the DB in i386 format though?  Is there an environment variable
> or something that can be set?

No,  the hosts rpm is used to populate the chroot.  when you enter the chroot 
you can delete /var/lib/rpm/__db*  and things will work.

You get the same issues with building say F-7 chroots on a F-9 host where the 
chroot has a different version of the the database than the host.

Dennis

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/fedora-buildsys-list/attachments/20080602/3fe9331e/attachment.sig>


More information about the Fedora-buildsys-list mailing list