From owner-freebsd-questions@FreeBSD.ORG Sat Aug 8 06:54:14 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 AEB681065670 for ; Sat, 8 Aug 2009 06:54:14 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 6AE488FC20 for ; Sat, 8 Aug 2009 06:54:14 +0000 (UTC) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MZfoj-0002Ga-70 for freebsd-questions@freebsd.org; Sat, 08 Aug 2009 06:54:13 +0000 Received: from 193.33.173.33 ([193.33.173.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Aug 2009 06:54:13 +0000 Received: from c.kworr by 193.33.173.33 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Aug 2009 06:54:13 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Volodymyr Kostyrko Date: Sat, 08 Aug 2009 09:54:02 +0300 Lines: 26 Message-ID: References: <20090408142932.695c07ce@summersault.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 193.33.173.33 User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.8.1.22) Gecko/20090724 SeaMonkey/1.1.17 In-Reply-To: <20090408142932.695c07ce@summersault.com> Sender: news 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 06:54:14 -0000 Mark Stosberg 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%%. You can use `find dir -type f | xargs -n1 -Ifoo sh -c "echo -n foo:; pkg_which foo"` to obtain the list of known files (pkg_which is part of ports-mgmt/portsupgrade). After that you can reinstall all packages that provide files with missing origin. I bet you should use the same /usr/ports you have last time when /var/db/pkg was full, just to be very close to pkg-plist. Other ways can include moving all %%PREFIX%% to %%PREFIX%%.old and building all ports from scratch. -- Sphinx of black quartz judge my vow.