Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 May 2019 14:07:16 +0100
From:      Grzegorz Junka <list1@gjunka.com>
To:        freebsd-ports@freebsd.org
Subject:   pkg query hackaton
Message-ID:  <460996e2-03ad-f044-9783-758a9b0b36d3@gjunka.com>

next in thread | raw e-mail | index | archive | help
Hi,

I am interested in two pkg query solutions and I thought I will ask here 
first, maybe someone already spend time or knows a better approach.

1. List of packages sorted by the amount of packages that depend on them

2. List of all recursive dependencies of a particular package


Ad1. Basically, it would be a list of all packages installed in the 
system where for each package the query would retrieve the amount of 
dependent packages. Then sort that list.

Bonus. Can 1. be also recursively, e.g. sum amounts of all dependent 
packages, then for each dependent package add that package's dependent 
packages, etc. This will likely cause loops so probably a state with 
packages already added would need to be maintained.

Ad2. Given package A list all its direct dependencies, then for each 
dependency list its dependencies, and so on. Add them to a big list then 
sort and unique. Can that be done in pkg query alone?


Out of interest, is "pkg install -R" truly recursive, i.e. would it 
reinstall any packages that require the given package indirectly 
(through another package, not through a direct dependency)?

GrzegorzJ





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?460996e2-03ad-f044-9783-758a9b0b36d3>