Unix & Linux
package-management freebsd upgrade dependencies pkg
Updated Tue, 23 Aug 2022 05:23:07 GMT

List Dependencies of Pending `pkg upgrade`

I wanted to update most of the stuff on my FreeBSD system, so I was going to perform a pkg upgrade. I noticed that one of the listed new packages to be installed was Wayland; I'm not interested in having Wayland on my system, and I'm curious as to what's trying to install it. I assume it's a new dependency introduced by one of my many (many) packages being upgraded.

Is there any built in, approved, or otherwise straightforward way of determining which of my updated packages would cause Wayland to be installed on my system without actually updating those packages?


You can come up with right incantation of pkg rquery, but the cheap way I'm using is running pkg install on the package that I'm suspecting for pulling in the undesired one.

Comments (4)

  • +0 – Maybe you want to add --dry-run option. — Jan 16, 2019 at 08:13  
  • +0 – Not really, pkg always asks if I want to continue, after showing the work plan. — Jan 16, 2019 at 08:16  
  • +1 – But with --dry-run works as a normal (non-root) user (without it doesn't). And you don't need answer if you want only the dependencies (and can use it in a script). — Jan 16, 2019 at 12:34  
  • +0pkg upgrade --dry-run | awk '{if ($NF~/UPGRADED/) {output=1; next}; if (output==1) {if ($0~/^\t/) {print} else {exit}}}' | tr -d '\t' | awk -F ':' '{print $1}' | xargs -I % -L 1 sh -c 'echo %; pkg upgrade --dry-run %;' Looks like a lot of things want to introduce Wayland. Sigh. — Jan 16, 2019 at 18:22