From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 30 02:11:10 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9907F16A418 for ; Fri, 30 Nov 2007 02:11:10 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from mail0.rawbw.com (mail0.rawbw.com [198.144.192.41]) by mx1.freebsd.org (Postfix) with ESMTP id 7765A13C457 for ; Fri, 30 Nov 2007 02:11:10 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from mail0.rawbw.com (localhost [127.0.0.1]) by mail0.rawbw.com (8.13.8/8.13.8) with ESMTP id lAU2B6P1085580; Thu, 29 Nov 2007 18:11:06 -0800 (PST) Received: (from www@localhost) by mail0.rawbw.com (8.13.8/8.13.8/Submit) id lAU2B6xS085578; Thu, 29 Nov 2007 18:11:06 -0800 (PST) X-Authentication-Warning: mail0.rawbw.com: www set sender to yuri@rawbw.com using -f Received: from ip224.carlyle.sfo.ygnition.net (ip224.carlyle.sfo.ygnition.net [24.219.144.224]) by webmail.rawbw.com (IMP) with HTTP for ; Thu, 29 Nov 2007 18:11:06 -0800 Message-ID: <1196388666.474f713a7d756@webmail.rawbw.com> Date: Thu, 29 Nov 2007 18:11:06 -0800 From: Yuri To: freebsd-hackers@freebsd.org References: <1196388002.474f6ea2bcf32@webmail.rawbw.com> In-Reply-To: <1196388002.474f6ea2bcf32@webmail.rawbw.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.1 X-Originating-IP: 24.219.144.224 X-Mailman-Approved-At: Fri, 30 Nov 2007 02:50:01 +0000 Subject: Re: pkgdb failures X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Nov 2007 02:11:10 -0000 I deleted this file: /var/db/pkg/pkgdb.db and then pkgdb -fu succeeded. But next time I ran I got the same error with /usr/ports/INDEX-7.db. Then this error disappear. So it's most likely the bug with Berkeley DB. Anybody else has these kind of problems? Yuri Quoting Yuri : > While doing portupgrade I am sporadically getting the error like below. > After I ran 'pkgdb -fu' few times and this cured tye problem. But then > after > a while of portupgrade run I now get the error: > > >pkgdb -fu > >---> Updating the pkgdb > >[Rebuilding the pkgdb in /var/db/pkg ... > /var/db/pkg/pkgdb.db: >unexpected file type or format -- Invalid argument: > Cannot update the pkgdb!] > > man pkgdb says: > BUGS > Sometimes a database may get corrupt, and the pkgtools commands may > abort > with a segmentation fault. In such cases, run ``pkgdb -fu'' to > rebuild > the database, and the problems should go away. > > So what should I do now to upgrade ports? > > Yuri > > -- error log during portupgrade -- > /var/db/pkg/pkgdb.db: unexpected file type or format -- Invalid argument > ** Command failed [exit code 1]: /usr/local/sbin/pkgdb -aFOQ > ---> Skipping 'net/openldap23-client' > ---> Reinstalling 'tcl-8.4.16,1' (lang/tcl84) > --