Recovering loss of /var/db/pkg ?
Robert Huff
roberthuff at rcn.com
Sat Aug 8 17:20:19 UTC 2009
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
More information about the freebsd-questions
mailing list