Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Aug 2009 20:13:31 +0000
From:      "b. f." <bf1783@googlemail.com>
To:        Robert Huff <roberthuff@rcn.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Recovering loss of /var/db/pkg ?
Message-ID:  <d873d5be0908081313u12767d56s346b00be2c8cea9f@mail.gmail.com>
In-Reply-To: <d873d5be0908081202t11c54674lc3b2ba266f296204@mail.gmail.com>
References:  <d873d5be0908080402n47e8ab48o4ec5c1c096005f0c@mail.gmail.com> <200908080932.27489.mel.flynn%2Bfbsd.questions@mailing.thruhere.net> <d873d5be0908081202t11c54674lc3b2ba266f296204@mail.gmail.com>

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



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