From owner-freebsd-questions@FreeBSD.ORG Sat Aug 8 17:20:18 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 5A741106564A for ; Sat, 8 Aug 2009 17:20:18 +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 0F9CB8FC28 for ; Sat, 8 Aug 2009 17:20:17 +0000 (UTC) Received: from mr02.lnh.mail.rcn.net ([207.172.157.22]) by smtp02.lnh.mail.rcn.net with ESMTP; 08 Aug 2009 13:20:17 -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.6-GA) with ESMTP id QBZ76921; Sat, 8 Aug 2009 13:20:05 -0400 (EDT) X-Auth-ID: roberthuff Received: from c-24-91-153-117.hsd1.ma.comcast.net (HELO [192.168.10.2]) ([24.91.153.117]) by smtp01.lnh.mail.rcn.net with ESMTP; 08 Aug 2009 13:20:05 -0400 Message-ID: <4A7DB3C1.1050708@rcn.com> Date: Sat, 08 Aug 2009 13:20:01 -0400 From: Robert Huff User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 CC: freebsd-questions@freebsd.org References: <20090408142932.695c07ce@summersault.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Sat, 08 Aug 2009 17:20:19 -0000 Volodymyr Kostyrko wrote: >> I'll just say it plainly: >> >> /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? >> >> My sense is that some recovery is possible, but may be prohibitively >> expensive. >> >> Thanks for any tips! > > There are a lot of common places the files would be installed such as > bin, sbin, lib, libexec under %%PREFIX%%. If the OP's intention is to be able to reconstruct the dependency tree, he's hosed. If the intention is to find out what was installed, there is some hope. This method works under the following conditions: 1) you were using ports (it may or may not work for packages) 2) you have not deleted /usr/ports/distfiles Basically, sweep through /usr/ports/distfiles. Most entries can be pretty easily mapped to the associated port, including version number. Unfortunately, I know of no way of rebuilding the contents of /var/db/pkg without re-(compiling, installing) every component of every port. If it does not exist, this would be a _killer_ ability to have; it's not often required (one hopes!) but when it is it would be a total lifesaver. Robert Huff