Xorg broken after upgrade to 12.2

Mike Clarke jmc-freebsd2 at milibyte.co.uk
Mon Nov 2 11:28:35 UTC 2020

On Monday, 2 November 2020 06:56:09 GMT Morten Bo Johansen via freebsd-
questions wrote:

> Is there a command that will show me which packages I have
> installed from the ports collection?

You can run 'pkg info --annotations pkg-name'. If a package has been 
installed from a repository it will be indicated there. E.g. for firefox 
installed from packages I have:

curlew:/home/mike% pkg info --annotations firefox 
       FreeBSD_version: 1201000 
       cpe            : cpe:2.3:a:mozilla:firefox:81.0:::::freebsd12:x64:2 
       no_provide_shlib: yes 
       repo_type      : binary 
       repository     : FreeBSD

But for lame installed from ports I have:

curlew:/home/mike% pkg info --annotations lame 
       FreeBSD_version: 1200086

With a bit of scripting you could iterate through all your packages testing 
for the presence or absence of a 'repository' line in the 'Annotations' 
sections. Something like this might do what you need.

for pkg in `pkg info -a | awk '{print $1}'` 
       pkg info -A $pkg | grep -q repository 
       if [ 0 -ne $? ] 
               echo $pkg built from ports 

Mike Clarke

More information about the freebsd-questions mailing list