From owner-freebsd-questions@FreeBSD.ORG Sun Dec 30 01:11:30 2007 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 6605916A419 for ; Sun, 30 Dec 2007 01:11:30 +0000 (UTC) (envelope-from roberthuff@rcn.com) Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by mx1.freebsd.org (Postfix) with ESMTP id AB2FA13C457 for ; Sun, 30 Dec 2007 01:11:29 +0000 (UTC) (envelope-from roberthuff@rcn.com) Received: from mr02.lnh.mail.rcn.net ([207.172.157.22]) by smtp02.lnh.mail.rcn.net with ESMTP; 29 Dec 2007 20:11:28 -0500 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr02.lnh.mail.rcn.net (MOS 3.8.6-GA) with ESMTP id OFK02167; Sat, 29 Dec 2007 20:11:28 -0500 (EST) Received: from 209-6-22-188.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com (HELO jerusalem.litteratus.org.litteratus.org) ([209.6.22.188]) by smtp01.lnh.mail.rcn.net with ESMTP; 29 Dec 2007 20:10:26 -0500 From: Robert Huff MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18294.61503.665255.18241@jerusalem.litteratus.org> Date: Sat, 29 Dec 2007 20:11:27 -0500 To: vittorio , freebsd-questions@freebsd.org In-Reply-To: <4776E945.309@FreeBSD.org> References: <200712292322.46822.vdemart1@tin.it> <4776E945.309@FreeBSD.org> X-Mailer: VM 7.17 under 21.5 (beta28) "fuki" XEmacs Lucid X-Junkmail-Whitelist: YES (by domain whitelist at mr02.lnh.mail.rcn.net) Cc: Subject: Re: Rebuilding /var/db/pkg X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2007 01:11:30 -0000 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