Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Nov 2017 17:20:02 +0000
From:      Arthur Chance <freebsd@qeng-ho.org>
To:        roberthuff@rcn.com
Cc:        Roland Smith <rsmith@xs4all.nl>, Olivier <Olivier.Nicole@cs.ait.ac.th>, questions@freebsd.org
Subject:   Re: Find ports that are not in the requeirement of others
Message-ID:  <3bed762f-81a1-6bff-6cc3-264236d1cb57@qeng-ho.org>
In-Reply-To: <23045.56768.939054.823818@jerusalem.litteratus.org>
References:  <wu77euyg7qu.fsf@banyan.cs.ait.ac.th> <20171110055737.GA30695@slackbox.erewhon.home> <898813fa-5bc5-dae2-5d40-618e07761b9c@qeng-ho.org> <23045.56768.939054.823818@jerusalem.litteratus.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/11/2017 17:11, roberthuff@rcn.com wrote:
> 
> Arthur Chance writes:
> 
>>  >> Is there an incantation of pkg(8) that can list all the ports that are a
>>  >> leaf in the tree of the installed ports.
>>  > 
>>  > From pkg-query(8):
>>  > 
>>  >     pkg query -e '%#r = 0' %o
>>  > 
>>  > Roland
>>  > 
>>  
>>  Or if you have the default config file installed, simply
>>  
>>  pkg leaf
> 
> 	On my system, "pkg query" returns 140 items, while "pkg leaf"
> returns 217.
> 	That is not round-off error.
> 	Anybody know why?

Distinctly odd. On my system

root@arthur:3# pkg query -e '%#r = 0' %o | wc -l
      62
root@arthur:3# pkg leaf | wc -l
      62

No idea why you're not getting the same number but maybe you could try

 (pkg leaf; pkg query -e '%#r == 0' '%n-%v') | sort -u

to see what the difference is. (Presuming your pkg leaf alias is the
same as the query. "grep leaf /usr/local/etc/pkg.conf" to make sure.)

-- 
An amusing coincidence: log2(58) = 5.858 (to 0.0003% accuracy).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bed762f-81a1-6bff-6cc3-264236d1cb57>