From owner-freebsd-questions@FreeBSD.ORG Fri Nov 2 21:22:50 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61C3816A41A for ; Fri, 2 Nov 2007 21:22:50 +0000 (UTC) (envelope-from kdk@daleco.biz) Received: from ezekiel.daleco.biz (southernuniform.com [66.76.92.18]) by mx1.freebsd.org (Postfix) with ESMTP id 19FA613C4AC for ; Fri, 2 Nov 2007 21:22:49 +0000 (UTC) (envelope-from kdk@daleco.biz) Received: from localhost (localhost [127.0.0.1]) by ezekiel.daleco.biz (8.13.8/8.13.8) with ESMTP id lA2LLWbY018705; Fri, 2 Nov 2007 16:21:32 -0500 (CDT) (envelope-from kdk@daleco.biz) X-Virus-Scanned: amavisd-new at daleco.biz Received: from ezekiel.daleco.biz ([127.0.0.1]) by localhost (ezekiel.daleco.biz [127.0.0.1]) (amavisd-new, port 10024) with LMTP id sASK5WSe3tiK; Fri, 2 Nov 2007 16:21:29 -0500 (CDT) Received: from archangel.daleco.biz (dsl.daleco.biz [209.125.108.70]) by ezekiel.daleco.biz (8.13.8/8.13.8) with ESMTP id lA2LLQgF018697; Fri, 2 Nov 2007 16:21:27 -0500 (CDT) (envelope-from kdk@daleco.biz) Message-ID: <472B94D0.8070104@daleco.biz> Date: Fri, 02 Nov 2007 16:21:20 -0500 From: Kevin Kinsey User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.2) Gecko/20070418 SeaMonkey/1.1.1 MIME-Version: 1.0 To: Jeffrey Goldberg References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD_Questions FreeBSD_Questions Subject: Re: pkgdb.db: unexpected file type or format X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2007 21:22:50 -0000 Jeffrey Goldberg wrote: > Yesterday I moved from 6.2-RELENG to 7-RELENG and everything worked fine > (though I do have a few questions about mergemaster that I'll ask later). > > As suggested on this list, I started to rebuild all of my ports. > > I started with > > portupgrade -f '<2007-11-01 12:00' > > and all seemed to go well until I realized that I should have added > "--batch" to that. So I interrupted the process and restarted with > > > portupgrade -f --batch '<2007-11-01 12:00' > > This has been running apparently just fine overnight, but then I noticed > that after building each port, they didn't get installed because I was > getting an error like > > /var/db/pkg/pkgdb.db: unexpected file type or format -- Invalid argument > > So I stopped things again and tried to fix pkgdb.db > > $ sudo pkgdb -v -F > ---> Checking the package registry database > /var/db/pkg/pkgdb.db: unexpected file type or format -- Invalid argument > $ sudo file /var/db/pkg/pkgdb.db > /var/db/pkg/pkgdb.db: Berkeley DB 1.85 (Hash, version 2, native byte-order) > > What should I do now. I suppose that my problem was with interrupting > the portupgrade the first time 'round. But is there anything I can do > to fix this. I've seen no responses, is this still a problem? First off, what does `file /var/db/pkg/pkgdb.db` report? And have you looked at pkgdb(5)? I'm only guessing, but maybe `pkgdb -aF` for starters, and maybe you'll have to do `pkgdb -u`. YMMV, and all that. Kevin Kinsey -- We totally deny the allegations, and we're trying to identify the allegators.