Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jun 2012 09:12:14 +0200
From:      Matthias Apitz <guru@unixarea.de>
To:        freebsd-questions@freebsd.org
Subject:   Re: Lost /var/db/pkg
Message-ID:  <20120613071213.GA1231@tiny.Sisis.de>
In-Reply-To: <4FD8304C.7000004@FreeBSD.org>
References:  <CAG%2BKJSJh7dQNg4cnHnu9O0u8_fmvWF0YuWQaeeVPxGrPSaDHnQ@mail.gmail.com> <4FD8304C.7000004@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <guru@unixarea.de> - 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120613071213.GA1231>