From owner-freebsd-questions@FreeBSD.ORG Wed Apr 8 21:49:23 2009 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 5E03C106566C for ; Wed, 8 Apr 2009 21:49:23 +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 0C5188FC2D for ; Wed, 8 Apr 2009 21:49:22 +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; 08 Apr 2009 17:49:22 -0400 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr02.lnh.mail.rcn.net (MOS 3.10.4-GA) with ESMTP id PRM07592; Wed, 8 Apr 2009 17:48:44 -0400 (EDT) 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; 08 Apr 2009 17:48:44 -0400 From: Robert Huff MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18909.7099.473247.432680@jerusalem.litteratus.org> Date: Wed, 8 Apr 2009 17:48:43 -0400 To: freebsd-questions@freebsd.org In-Reply-To: <44iqlf2bc1.fsf@be-well.ilk.org> References: <20090408142932.695c07ce@summersault.com> <44iqlf2bc1.fsf@be-well.ilk.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) Subject: Re: Recovering loss of /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: Wed, 08 Apr 2009 21:49:23 -0000 Lowell Gilbert writes: > > /var/db/pkg is long gone and there is no backup. It was not copied to > > new a machine. > > > > Is there is any hope of being able to use the ports or packages > > system in a meangingful way again? > > You can do a forced reinstall of all your ports, and you'll end > up with a repopulated ports database. It will take a lot of > clock time, but not much human time. Assuming everything goes cleanly. > It's not necessarily easy to figure out what all of the ports > were, but there are a number of choices. It will make life ... interesting ... if the OP ever wants to update. I'm not sure I fully understand the original question. However: I have ~950 ports on the current box. At one point I lost /var/db/pkg and needed to rebuild. Remembering some of what was installed was easy - OpenOffice, FireFox, java, gnome/kde, etc., all of which draw in large numbers of (cummonly-used) dependencies. But there were others I would have had no hope of even remembering I had installed. Then I realized I still had /usr/ports/distfiles, and most of the tarball names give you enough clue you can correctly guess the package from /usr/ports INDEX. If I knew anything about the MASTER_SITES (I think) variable(s ?) I could porbably have written a script. (For those who go this route, the "pkg_sort" program that comes with portupgrade will be useful.) Robert huff