Recovering loss of /var/db/pkg ?

b. f. bf1783 at googlemail.com
Sat Aug 8 20:13:33 UTC 2009


Robert Huff wrote:
> 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.

Well, if you know which ports were installed, and if the installed
ports correspond to the versions in your ports tree, and if both
make.conf and /var/db/ports are intact (a lot of ifs here ...), you
can reconstruct it by running :

make generate-plist fake-pkg

in the origin of each of the installed ports, which doesn't require
rebuilds.  IF there is cruft left in /var/db/pkg, then you need to do
this with FORCE_PKG_REGISTER=yes, or empty /var/db/pkg first.

b.


More information about the freebsd-questions mailing list