From owner-freebsd-questions@FreeBSD.ORG Tue Aug 6 19:55:40 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0394F296 for ; Tue, 6 Aug 2013 19:55:40 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 731452284 for ; Tue, 6 Aug 2013 19:55:39 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.2.117.99]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.7/8.14.7) with ESMTP id r76JtR9r035683 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Tue, 6 Aug 2013 20:55:33 +0100 (BST) (envelope-from matthew@FreeBSD.org) DKIM-Filter: OpenDKIM Filter v2.8.3 smtp.infracaninophile.co.uk r76JtR9r035683 Authentication-Results: smtp.infracaninophile.co.uk/r76JtR9r035683; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy) Message-ID: <520154A4.4040709@FreeBSD.org> Date: Tue, 06 Aug 2013 20:55:16 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: How to Fix Port Audit showing ports not installed on a system References: <58b0a130601de49508aa7f7b8c1c9833@dweimer.net> <52012B43.5000000@ifdnrg.com> <8826af281224e2db334d446a51c11342@dweimer.net> In-Reply-To: <8826af281224e2db334d446a51c11342@dweimer.net> X-Enigmail-Version: 1.5.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FOb8PdlJhd0lXMunOlv47SppjjLQ0kEm5" X-Virus-Scanned: clamav-milter 0.97.8 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2013 19:55:40 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --FOb8PdlJhd0lXMunOlv47SppjjLQ0kEm5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 06/08/2013 19:23, dweimer wrote: > Of course I have WITH_PKGNG=3D"YES" in the make.conf, and I believe tha= t > 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=3D"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 thin= gs. 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 --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey --FOb8PdlJhd0lXMunOlv47SppjjLQ0kEm5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIBVK8ACgkQ8Mjk52CukIyzGwCcCFec8wbpvx0W+H4rxNAPlzlk g4MAn3ZFU+5sIDmLt2Vp+4JDk/9dUCki =ZlE9 -----END PGP SIGNATURE----- --FOb8PdlJhd0lXMunOlv47SppjjLQ0kEm5--