How to Fix Port Audit showing ports not installed on a system
Matthew Seaman
matthew at FreeBSD.org
Tue Aug 6 19:55:40 UTC 2013
On 06/08/2013 19:23, dweimer wrote:
> Of course I have WITH_PKGNG="YES" in the make.conf, and I believe that
> has been there ever since the server was built. Is my best option to
> get the correct list from pkg info use rm -r /var/db/pkg/* to clear
> everything out and then reinstall all of the ports?
If you've had WITH_PKGNG="YES" ever since the server was built then you
shouldn't have any of the old-style pkg_tools entries in /var/db/pkg.
Unless, that is, you've been using pkg_add(1) directly. Don't do that.
You just end up with a complete mess. Remember folks -- pkgng is like
getting married. Once you go with pkgng, you're not meant to dally with
other package tools, but to stay faithful to pkgng from henceforth.
I hope you've got the old-style pkg_tools per-package subdirectories in
/var/db/pkg because either (i) you used to use pkg_tools and you ran
pkg2ng to convert or (ii) you've been using portmaster, in which case
those sub-directories only /look/ like the result of what pkg_tools
generates, but are really just a place for portmaster to stash a few things.
If those sub-directories contain files called thing like +CONTENTS or
+COMMENT or other names beginning with '+' then you do have a messed up
mixture of old pkg_tools and pkgng.
First: remove all the subdirectories but *not* local.sqlite or
repo.sqlite -- those are rather important bits of pkgng.
Then you can force a reinstall of all packages by
pkg upgrade -f
Obviusly, you'll need pkg(8) configured to use a repo with all the
appropriate packages available.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 268 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20130806/b6b57ae0/attachment.sig>
More information about the freebsd-questions
mailing list