Date: Wed, 13 Jun 2012 08:03:50 -0400 From: Robert Huff <roberthuff@rcn.com> To: Matthew Seaman <matthew@freebsd.org> Cc: freebsd-questions@freebsd.org Subject: Re: Lost /var/db/pkg Message-ID: <20440.33190.905351.819751@jerusalem.litteratus.org> 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
Matthew Seaman writes:
> > 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.
Only that's going to eradicate anything in /usr/local that a)
one wants/uses and b) wasn't put there by ports. (Tell me you don't
have a handful of scripts which have been working happily away since
you wrote them in the early Devonian. :-)
A less drastic path would be to wipe out /usr/local/{lib,
libexec}, /compat/linux, and whatever directory has port-installed
docs.
Check /usr/local/bin, /usr/local/etc (especially rc.d/), and
/usr/local/share; many files there are named for their ports. Grep
bin/ for anything whose first line is "#! /bin/sh", and figure out
where it came from.
_Now_ start with major prograns you know were installed -
on my system that would be emacs, FireFox, Java, LibreOffice,
ImageMagick, and mplayer - and get out your copy of <very long
pretentious novel> - because even on a fast system you're talking
days to put everything back.
Robert "learned the hard way" Huff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20440.33190.905351.819751>
