From owner-freebsd-questions@FreeBSD.ORG Wed Jun 13 07:12:25 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A574106564A for ; Wed, 13 Jun 2012 07:12:25 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id C16798FC08 for ; Wed, 13 Jun 2012 07:12:24 +0000 (UTC) Received: from [82.113.121.231] (helo=tiny.Sisis.de) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1SehkX-0000aP-M8 for freebsd-questions@freebsd.org; Wed, 13 Jun 2012 09:12:18 +0200 Received: from tiny.Sisis.de (localhost [127.0.0.1]) by tiny.Sisis.de (8.14.5/8.14.3) with ESMTP id q5D7CFV7001254 for ; Wed, 13 Jun 2012 09:12:15 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by tiny.Sisis.de (8.14.5/8.14.3/Submit) id q5D7CEDD001253 for freebsd-questions@freebsd.org; Wed, 13 Jun 2012 09:12:14 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: tiny.Sisis.de: guru set sender to guru@unixarea.de using -f Date: Wed, 13 Jun 2012 09:12:14 +0200 From: Matthias Apitz To: freebsd-questions@freebsd.org Message-ID: <20120613071213.GA1231@tiny.Sisis.de> References: <4FD8304C.7000004@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4FD8304C.7000004@FreeBSD.org> X-Operating-System: FreeBSD 10.0-CURRENT r226986 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 82.113.121.231 Subject: Re: Lost /var/db/pkg X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jun 2012 07:12:25 -0000 El día Wednesday, June 13, 2012 a las 07:16:44AM +0100, Matthew Seaman escribió: > On 13/06/2012 02:03, William Orr wrote: > > I had a hard disk failure some time ago, and I ended up losing > > /var/db/pkg/ and everything under it (before you say I should've been > > backing it up, I know, I was actually doing an initial full when this > > happened). Is there a way I can restore it, or at least manually add > > entries I know for sure about? > > Reinstall all the ports on your system? Since you've lost /var/db/pkg, > you won't have a handy record of what the necessary packages are. You > can get a long way by starting with ports you want directly (eg. > firefox) and reinstalling all of their dependencies. > > It's unlikely to be completely accurate, and the system will probably > have odd little issues with normal ports maintenance going on. Perhaps > the most effective procedure would be to wipe out the contents of > /usr/local and /compat/linux and just start again from scratch. The later is the only way: wipe out /usr/local and /compat/linux because many ports during the intent of 'make install' will check for files there and do nothing for ports they depend on because they 'think' that the port on which they depend on is installed already. Without this you will never ever get a correct /var/db/pkg. matthias -- Matthias Apitz e - w http://www.unixarea.de/ UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5