Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Jul 2006 11:16:52 -0500
From:      "Donald J. O'Neill" <donaldjoneill@gmail.com>
To:        freebsd-stable@freebsd.org
Cc:        Volker <volker@vwsoft.com>, Dominik Zalewski <dzalewski@open-craft.com>, Vlad GALU <vladgalu@gmail.com>
Subject:   Re: Portupgrade failed - /var/db/pkg/pkgdb.db: unexpected file type or format
Message-ID:  <200607021116.53432.duncan.fbsd@gmail.com>
In-Reply-To: <200607021637.37741.dzalewski@open-craft.com>
References:  <200607021408.33744.dzalewski@open-craft.com> <79722fad0607020635i53ffc6clca3e9cf7b50fe101@mail.gmail.com> <200607021637.37741.dzalewski@open-craft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 02 July 2006 08:37, Dominik Zalewski wrote:
> On Sunday 02 July 2006 16:35, Vlad GALU wrote:
> > On 7/2/06, Dominik Zalewski <dzalewski@open-craft.com> wrote:
> > > I'm using FreeBSD 6.1-stable . Today I updated my ports tree using
> > > cvsup and then I ran as usually portupgrade -a . It upgraded my
> > > portupgrade to version portupgrade-2.1.3.2,2. After that portupgrade
> > > stopped working.
> > >
> > > Here is an error message:
> > >
> > > [root@silicon /]# portupgrade -a
> > > [Updating the pkgdb <format:bdb_btree>
> > > in /var/db/pkg ... /var/db/pkg/pkgdb.db: unexpected file type or format
> > > -- Invalid argument; rebuild needed] [Rebuilding the pkgdb
> > > <format:bdb_btree> in /var/db/pkg ... [Updating the pkgdb
> > > <format:bdb_btree>
> > > in /var/db/pkg ... /var/db/pkg/pkgdb.db: unexpected file type or format
> > > -- Invalid argument; rebuild needed] [Rebuilding the pkgdb
> > > <format:bdb_btree> in /var/db/pkg ... /var/db/pkg/pkgdb.db: unexpected
> > > file type or format -- Invalid argument: Cannot update the pkgdb!]:
> > > Cannot update the pkgdb!] Command failed [exit code 1]:
> > > /usr/local/sbin/pkgdb -aFQ
> >
> >    Removing pkgdb.db and INDEX-6.db and then rebuilding them with
> > pkgdb and portsdb did the trick for me.
> >
> > > Any ideas?
> > >
> > > Thank you in advance,
> > >
> > >      Dominik Zalewski
> > > _______________________________________________

>
> Thanks man, alreadt fixed :)
>
> Regards,
>
>       Dominik Zalewski
>

Pretty good answers, but it may involve a little more work than that. This is 
what I did:

mv /usr/ports/INDEX-6.db --> INDEX-6.db.org
mv /var/db/pkg/pkgdb.db --> pkgdb.db.org

pkg_delete portupgrade-2.1.3.1,2
pkg_delete ruby18-bdb-0.5.9
pkg_delete ruby18-bdb1-0.2.2
pkg_delete db4-4.0.14_1,1
pkg_delete db41-4.1.25_3
pkg_delete db42-4.2.52_4

I left db43-4.3.29, It would be needed later and reomoving it would cause too 
many other things to have to be rebuilt (or I get a bite in the ass if I 
don't).

cd /usr/ports/sysutils/portupgrade
make conf  ----- select bdb4, it'll use db43 as that's what's installed
make package-recursive

pkgdb -F	fix the dependencies
portversion -v |grep needs	rebuilds portsdb (and rechecks pkgdb.db) and I find 
out what ports need upgrading.

By the way, I don't use cvsup to upgrade the ports tree. I use portsnap. It's 
way faster than cvsup. When I used cvsup it could take up to 1/2 hr 
(depending on the computer speed) to get to the point of upgrading ports. 
Using portsnap, it only takes a couple of minutes to get to it.

Don



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607021116.53432.duncan.fbsd>