From owner-freebsd-questions@FreeBSD.ORG Sat Mar 1 02:42:45 2008 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 9AEE41065670 for ; Sat, 1 Mar 2008 02:42:45 +0000 (UTC) (envelope-from oscartheduck@gmail.com) Received: from el-out-1112.google.com (el-out-1112.google.com [209.85.162.183]) by mx1.freebsd.org (Postfix) with ESMTP id 4ECD58FC14 for ; Sat, 1 Mar 2008 02:42:45 +0000 (UTC) (envelope-from oscartheduck@gmail.com) Received: by el-out-1112.google.com with SMTP id y26so9966ele.8 for ; Fri, 29 Feb 2008 18:42:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:reply-to:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=S60RiETern/vvrLOOxLAM0x0cfaAjdjNmtKceKF/1wk=; b=xqWcA2hz8gorfSf2kFjRSUoQ2MCVrhUlNfo1m7hE0xS361DG3CULKOGaxZPcFeq2OF7Bis22w3Irt7i7BeH7Z2qeBi+sSEL3Ux41+Pyw/s4VnqRrqxd42jXyOx8oh9HpdkbAxjPyUxX2L/h3fBero1ioEFe078EmlKXmiRAyyqQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:reply-to:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=R4nCJTK6YrAmcvENKGTTvJ95cpObOe66Ftm7TbBODP+a7sJ/aX8PGr8ui7DAo3/qITKrR4mnYgG2FmH72qRLniEjRQGDjhoDenopYyXzUVCv1OmvxcgL0yUs/PaCCtvsdccQFxKo1FCKWEmGQlOmUpQ94MXv/gisJO1xnYwSuUU= Received: by 10.140.82.40 with SMTP id f40mr6879155rvb.0.1204339364068; Fri, 29 Feb 2008 18:42:44 -0800 (PST) Received: from ?192.168.1.104? ( [68.35.151.186]) by mx.google.com with ESMTPS id b2sm24206326rvf.9.2008.02.29.18.42.42 (version=SSLv3 cipher=RC4-MD5); Fri, 29 Feb 2008 18:42:43 -0800 (PST) From: James To: Patrick Mahan In-Reply-To: <47C8A807.9060907@mahan.org> References: <47C86A22.4010706@mahan.org> <200802292256.59433.fbsd.questions@rachie.is-a-geek.net> <47C8A807.9060907@mahan.org> Content-Type: text/plain Date: Fri, 29 Feb 2008 19:42:44 -0700 Message-Id: <1204339364.10712.5.camel@pclmills> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit Cc: Mel , freebsd-questions@freebsd.org Subject: Re: Having problems with my ports configuration X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: oscartheduck@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2008 02:42:45 -0000 On Fri, 2008-02-29 at 16:49 -0800, Patrick Mahan wrote: > > Mel presented these words - circa 2/29/08 1:56 PM-> > > On Friday 29 February 2008 21:25:06 Patrick Mahan wrote: > >> System Info: > >> > >> Compaq Presario (AMD Athlon CPU) > >> 256 Mbytes RAM > >> 80 Gig IDE system disk > >> FreeBSD 5.5-RELEASE #0: Tue May 23 14:58:27 UTC 2006 > >> > >> I am having problems with my current installed ports. Last week > >> the drive where /usr/ports is upon (80 Gig IDE) start generating > >> READ errors on the console and hanging the system. It took a few > >> days of doing multiple reboots, fsck and BIOS work before it was > >> back operating again. > >> > >> One of the issues that came out of this was it seemed that the > >> ports database (/var/db/pkg/pkgdb.db) was corrupt. So I tried > >> to rebuild it by deleting it and setting PKG_DBDIR). I issued > >> a 'portsdb -Uu' and it fails - > > > > You're confusing .db's here. /vardb/pkg/pkgdb.db is fixed or rebuilt, using > > pkgdb -F. But read on... > > > > Okay... > > >> host# portsdb -Uu > >> Updating the ports index ... Generating INDEX.tmp - please > >> wait..p5-DateTime-Calendar-Japanese-0.06001: > >> "/usr/ports/japanese/p5-DateTime-Calendar-Japanese-Era" non-existent -- > >> dependency list incomplete > >> ===> devel/p5-DateTime-Calendar-Japanese failed > >> *** Error code 1 > >> 1 error > > > > You're missing that directory, fsck probably deleted it. If you wanted to keep > > your old ports tree, you're outof luck without having a backup. > > Otherwise: > > csup -L2 /path/to/ports-supfile > > This is cvsup, correct? > > > > > Or use portsnap, or whatever you're comfy with. > > > > > >> I've tried fetching a new INDEX, done a pkgdb -Fu, but nothing seems to > >> work. > > > > pkgdb -F does nothing? No errors, warnings? Could be your /var/db/pkg is > > damaged as well, if it's the same disk. > > > > pkgdb -F gives the following: > > host# pkgdb -F > ---> Checking the package registry database > host# > > I'll look at using the other methods. Is there any way I can hand parse > through the info under /usr/ports to determined everything I have installed? > > Thanks, > > Patrick Haha! I had a similar problem a long time ago. I deleted the pkgdb and started working to rebuild. The simple answer is no, don't bother, just reinstall. The long answer is that the most success I got was writing a little script to go through /usr/ports/distfiles and reinstall everything it finds listed in there. It doesn't resolve things completely, and you'll get weird errors from things that're missed, but you can track those down. The other answer is that if you never did make clean anywhere, then you can write a script to look through everything that has a work directory and reinstall those. It'll miss some stuff, but it's again better than nothing. Eventually, I just decided screw it all and backed up my home directory and started from scratch because it was taking more time than I wanted. I seem to recall there's also a pkg tool that'll try and work out what you have installed and reinstall things, but it was a while back that I did this. Best of luck to you James