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


_______________________________________________
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to