From owner-freebsd-ports@FreeBSD.ORG Thu Feb 1 13:01:07 2007 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8190616A405 for ; Thu, 1 Feb 2007 13:01:07 +0000 (UTC) (envelope-from mopsfelder@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.freebsd.org (Postfix) with ESMTP id 1B76413C4A3 for ; Thu, 1 Feb 2007 13:01:06 +0000 (UTC) (envelope-from mopsfelder@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so447845uge for ; Thu, 01 Feb 2007 05:01:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AQNGl9cRSZWauCiZ/56iv2uhwWn43anPj9wae5tYpKWC3lPTEXU8cKPw441VaSwYkozll14ThaKEGg4Dtwc52Ajfi8cDzSJVUmJrruKcsVqzxXSonJ5otg3jPINeVgbbvhM58DAAdJwAiRiR49MKIyGMmy1xkZPP3vIw4hx4zL4= Received: by 10.82.111.8 with SMTP id j8mr631249buc.1170333167661; Thu, 01 Feb 2007 04:32:47 -0800 (PST) Received: by 10.82.117.1 with HTTP; Thu, 1 Feb 2007 04:32:47 -0800 (PST) Message-ID: Date: Thu, 1 Feb 2007 10:32:47 -0200 From: "=?ISO-8859-1?Q?Murilo_Opsfelder_Ara=FAjo?=" To: freebsd-ports@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <45C12797.7090707@hs-heilbronn.de> <200702010145.55226.molnarcs@gmail.com> Subject: Re: portupgrade-2.2.2_1,2 corrupts portsdb X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2007 13:01:07 -0000 On 2/1/07, Philip Kizer wrote: > On 2007, Jan 31, at 18:45, Csaba Molnar wrote: > > I deleted /var/db/pkg/pkgdb.db, then rebuilt it with pkgdb -u I > > think, and > > that seems to have worked. > > > > While I was updating ports before this error showed up, the options > > screen for > > portupgrade showed up - and option WITH_BDB4 was unchecked. I > > changed that > > (so portupgrade was now built with bdb4) - and the problems began > > right after > > this update. > > I think you are on the right track, I had a working stable > portupgrade/portsdb environment and after the last update I started > getting that as well...my options for portupgrade to use BDB4 were > unchanged from before through after the upgrade: WITH_BDB4 was true > for both cases. > > If I recompile portupgrade with: > > WITHOUT_BDB4=3Dtrue > WITH_BDB1=3Dtrue > > which also requires me to pkg_delete ruby-bdb, then it all seems to > work just fine with no more warnings or errors. > > After a bit more trial and error, I find I can replicate the problem > by performing the following: > > # portinstall databases/ruby-bdb > # portversion -l'<' -v > [missing key: categories] [Updating the portsdb > in /usr/ports ... - 16414 port entries found ......... > 1000.........2000.........3000.........4000.........5000.........6000... > ...... > 7000.........8000.........9000.........10000.........11000.........12000 > .........13000.........14000.........15000.........16000.... ..... done] > missing key: categories: Cannot read the portsdb! > [...snip...] > # portversion -l'<' -v > [missing key: categories] [Updating the portsdb > in /usr/ports ... - 16414 port entries found ......... > 1000.........2000.........3000.........4000.........5000.........6000... > ...... > 7000.........8000.........9000.........10000.........11000.........12000 > .........13000.........14000.........15000.........16000.... ..... done] > missing key: categories: Cannot read the portsdb! > > > and then I can remove any visible problems by performing: > > # pkg_delete ruby18-bdb-0.5.9_2 > # portversion -l'<' -v > [Updating the pkgdb in /var/db/pkg ... Failed > `Inappropriate file type or format'; rebuild needed] [Rebuilding the > pkgdb in /var/db/pkg ... - 428 packages found (-0 > +428) .................................................................. > ........................................................................ > ........................................................................ > ........................................................................ > ........................................................................ > ........................................................................ > .. done] > [Failed `Inappropriate file type or format'] [Updating the portsdb > in /usr/ports ... - 16414 port entries > found ......... > 1000.........2000.........3000.........4000.........5000.........6000... > ...... > 7000.........8000.........9000.........10000.........11000.........12000 > .........13000.........14000.........15000.........16000.... ..... done] > [...snip...] > # portversion -l'<' -v > [...snip...] > > > > -philip > Hi all, Yesterday I had the same problem and garga@ helped me to solve that. He told me to change my ports database to dbm_hash. Just add these two lines in /usr/local/etc/pkgtools.conf around line number= 160: ENV['PKG_DBDRIVER'] ||=3D 'dbm_hash' ENV['PORTS_DBDRIVER'] ||=3D 'dbm_hash' Remove your pkgdb.db and INDEX.db and rebuild them. The dbm_hash is a little bit more slow, but don't crash :) This change is recommended to servers. I hope this help you. Best regards. --=20 Murilo Opsfelder Ara=FAjo #391561 mopsfelder [saispam] gmail [ponto] com