Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Dec 2007 20:11:27 -0500
From:      Robert Huff <roberthuff@rcn.com>
To:        vittorio <vdemart1@tin.it>, freebsd-questions@freebsd.org
Subject:   Re: Rebuilding /var/db/pkg
Message-ID:  <18294.61503.665255.18241@jerusalem.litteratus.org>
In-Reply-To: <4776E945.309@FreeBSD.org>
References:  <200712292322.46822.vdemart1@tin.it> <4776E945.309@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

Kris Kennaway writes:

>  > I committed a crime! While upgrading the ports under the newly
>  > installed RELENG_7 (beta4) with "portupgrade -arRk" I **deleted**
>  > the directory /var/db/pkg. 
>  > 
>  > Is there any way to rebuild it from scratch?
>  
>  Nope, that was the only copy.

	Assuming there are no backups, he will have to rebuild "from
scratch".  I see two approaches:
	I) Find complex leaf programs, like FireFox or OpenOffice.
Build the port; this will drag in all the dependencies.
	II) a) Look in /usr/ports/distfiles, where all the distribution
tarballs live.
	b) Prune the resulting list, so you're only trying to build one
of any given port.
	c) Map the tarball name to the port.  A discussion of how to
do this happened within the last year on either questions@ or
ports@, and may contain usable scripts.
	d) Lay in a good supply of your favorite caffeinated beverage,
and set to work.

	In either case, design and implement a backup method.



				Robert Huff



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