Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Aug 2009 09:54:02 +0300
From:      Volodymyr Kostyrko <c.kworr@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Recovering loss of /var/db/pkg ?
Message-ID:  <h5j7eb$ora$1@ger.gmane.org>
In-Reply-To: <20090408142932.695c07ce@summersault.com>
References:  <20090408142932.695c07ce@summersault.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.




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