From owner-freebsd-questions@FreeBSD.ORG Wed Jul 5 08:39:28 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2DAB716A4DA for ; Wed, 5 Jul 2006 08:39:28 +0000 (UTC) (envelope-from gerard@seibercom.net) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 93EDE43D45 for ; Wed, 5 Jul 2006 08:39:27 +0000 (GMT) (envelope-from gerard@seibercom.net) Received: by wr-out-0506.google.com with SMTP id 55so677932wri for ; Wed, 05 Jul 2006 01:39:27 -0700 (PDT) Received: by 10.54.150.2 with SMTP id x2mr2625537wrd; Wed, 05 Jul 2006 01:39:26 -0700 (PDT) Received: from scorpio ( [216.45.217.148]) by mx.gmail.com with ESMTP id 44sm5974086wri.2006.07.05.01.39.26; Wed, 05 Jul 2006 01:39:26 -0700 (PDT) From: Gerard Seibert Organization: Seibercom.net To: freebsd-questions@freebsd.org Date: Wed, 5 Jul 2006 04:39:21 -0400 User-Agent: KMail/1.9.3 References: <20060702205752.89100.qmail@web61016.mail.yahoo.com> <44AB686B.7040003@psam.se> In-Reply-To: <44AB686B.7040003@psam.se> X-Face: "\j?x](l|]4p?-1Bf@!wN<&p=$.}^k-HgL}cJKbQZ3r#Ar]\%U(#6}'?<3s7%(%(=?utf-8?q?gxJxxc=0A=09RnSNPNr*/=5E=7EStawWU9KDJ-CT0k=24f=23?=@t2^K&BS_f|?ZV/.7Q MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200607050439.23258.gerard@seibercom.net> Subject: Re: Portupgrade X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gerard@seibercom.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2006 08:39:28 -0000 On Wednesday 05 July 2006 03:21, Psadi wrote: > HI > > This problem is that the /var/db/pkg/pkgdb.db has been damaged. What you > need to do is to build a new pkgdb.db file > First cd /var/db/pkg save the old pkgdb by > mv pkgdb.db -> pkgdb.old > then you run pkgdb -u > > after that you should be up and running again. > > Psadi > > jan gestre skrev: > > On 7/3/06, Bill Moran wrote: > >> "E. J. Cerejo" wrote: > >> > >> > >> portupgrade itself I'm getting this message (message bellow) or > >> similar one > >> everytime I run one of the portupgrade commands like pkgdb -u or -F, > >> portversion -L =3D or portupgrade itself. =A0Tells me that the database > >> needs to > >> be rebuild, I run portsdb -uU and I get this same error message (messa= ge > >> bellow) it rebuilds with portsdb -fuU but still get this same message. > >> > >> /var/db/pkg/pkgdb.db: unexpected file type or format -- Invalid > >> argument; > >> rebuild needed] [Rebuilding the pkgdb in > >> /var/db/pkg ... > >> [Updating the pkgdb in /var/db/pkg ... > >> /var/db/pkg/pkgdb.db: unexpected file type or format -- Invalid > >> argument; > >> rebuild needed] [Rebuilding the pkgdb in > >> /var/db/pkg ... > >> /var/db/pkg/pkgdb.db: unexpected file type or format -- Invalid > >> argument: > >> Cannot update the pkgdb!]: Cannot update the pkgdb!] > >> > >> > >> When was the last time you did a cvsup? > >> > >> Portupgrade was hosed for a few days there, if your ports tree > >> previously > >> installed the hosted version, portupgrade won't work. > >> > >> If this is the case, the solution is: > >> 1) cvsup ports > >> 2) pkg_delete portupgrade > >> 3) cd /usr/ports/sysutils/portupgrade && make install clean > >> > >> Portupgrade will then start working again. > >> > >> i always do a cvsup before upgrading the ports but i got the same > >> problem, > > > > pkg_delete did not work coz it can't see the portupgrade version that is > > installed so i did a make deinstall and make reinstall instead but > > with the > > same result, any idea how will i solve this? =46rom: /usr/ports/UPDATING - THIS MIGHT BE PERTINENT - 20060703: AFFECTS: users of sysutils/portupgrade AUTHOR: sem@FreeBSD.org Because of portupgrade had a bug with detecting of Berkley DB version 2+, and a default database now set to use this version you can get portupgrade don't work with old databases. A quick fix is removing the databases: `rm /var/db/pkg/pkgdb.db /usr/ports/INDEX*.db'. portupgrade will recreate them automaticaly. It's absolutely no harm. If you don't want remove the databases you should detect what database type do you use, and set port options accordly. Follow the instructions: - run `pkgdb -fu' *before* upgrading and take a look on the output. You can see database format there as: format:XXX, where XXX is your current database format. - Go to portupgrade port directory and configure the port with `make config' command. If you have bdb_* format then turn on BDB4 optio= n, if you have bdb1_* format then turn off BDB4 and turn on BDB1 option. If you have dbd_hash format then turn off all option. - Upgrade portupgrade. Note: if you change database format with changing port options, you should remove ruby-bdb* port that you don't need anymore or to hard code database format in your pkgtools.conf. =2D-=20 Gerard Seibert gerard@seibercom.net COMPASS [for the CDC-6000 series] is the sort of assembler one expects from a corporation whose president codes in octal. J. N. Gray