Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Aug 2013 15:15:28 -0500
From:      dweimer <dweimer@dweimer.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: How to Fix Port Audit showing ports not installed on a system
Message-ID:  <2b8049260286a7d051c01a636113dc81@dweimer.net>
In-Reply-To: <520154A4.4040709@FreeBSD.org>
References:  <58b0a130601de49508aa7f7b8c1c9833@dweimer.net> <52012B43.5000000@ifdnrg.com> <8826af281224e2db334d446a51c11342@dweimer.net> <520154A4.4040709@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 08/06/2013 2:55 pm, Matthew Seaman wrote:
> 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

Thanks for the info, I have never used pkg_add, everything has been 
installed via ports and portmaster, but it is possible that some ports 
were installed prior to having the with pkgng added in make.conf, and 
that something happened in the pk2ng conversion.  I thought I had built 
this machine after I had been running with pkgng, but perhaps this one 
was built right as I was switching over to it.  I had originally built 
this machine with Xorg and KDE to use virtual box GUI, and once I became 
comfortable with the commands, switched to vboxheadless and removed all 
the GUI components.  Which is where all the extra ports that were 
removed came from.

I have removed the sub directories, now portaudit doesn't show any 
vulnerabilities in non existent ports, pkg info displays the correct 
installed packages, and portmaster -l matches the installed ports that 
pkg info displays.

-- 
Thanks,
    Dean E. Weimer
    http://www.dweimer.net/



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