From owner-freebsd-stable@FreeBSD.ORG Sun Jul 2 16:18:32 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B57416A407 for ; Sun, 2 Jul 2006 16:18:32 +0000 (UTC) (envelope-from donaldjoneill@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.181]) by mx1.FreeBSD.org (Postfix) with ESMTP id A454D43D45 for ; Sun, 2 Jul 2006 16:18:31 +0000 (GMT) (envelope-from donaldjoneill@gmail.com) Received: by py-out-1112.google.com with SMTP id c63so840106pyc for ; Sun, 02 Jul 2006 09:18:30 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id:from; b=M67XJolkvRkobAZ6viOJPi2tLr1J6LM4+WQUPS9iD1jppaODqcnyV9qEC9XAQd0sGI7VYFjxMhj2PpT92o/+uOe/pMxH9v7Qx3JE2+5GuZRprpmFSbkPC2tsLmLJE4980Jjx9BP/h/q9kRqvfB+kc6UR4Y29LLQ4mAPSj8fD8Mo= Received: by 10.35.27.1 with SMTP id e1mr254978pyj; Sun, 02 Jul 2006 09:18:30 -0700 (PDT) Received: from pres1750.airedalians.com ( [75.7.74.134]) by mx.gmail.com with ESMTP id t70sm1454829pyg.2006.07.02.09.18.29; Sun, 02 Jul 2006 09:18:29 -0700 (PDT) To: freebsd-stable@freebsd.org Date: Sun, 2 Jul 2006 11:16:52 -0500 User-Agent: KMail/1.9.3 References: <200607021408.33744.dzalewski@open-craft.com> <79722fad0607020635i53ffc6clca3e9cf7b50fe101@mail.gmail.com> <200607021637.37741.dzalewski@open-craft.com> In-Reply-To: <200607021637.37741.dzalewski@open-craft.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607021116.53432.duncan.fbsd@gmail.com> From: "Donald J. O'Neill" Cc: Volker , Dominik Zalewski , Vlad GALU Subject: Re: Portupgrade failed - /var/db/pkg/pkgdb.db: unexpected file type or format X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2006 16:18:32 -0000 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 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 > > > 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 ... [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!] 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