pkg search dependency tree
matthew at FreeBSD.org
matthew at FreeBSD.org
Fri Jan 12 15:38:35 UTC 2018
On 12/01/2018 11:09, Marko Cupać wrote:
> Hi,
>
> I have accidentally deleted my poudriere package lists. I still have
> all packages in my repos.
>
> I know I can get list of all packages in my repo in appropriate
> format with `pkg search -o -x . | awk -F ' ' '{ print $1 }' | sort',
> but this way I'm listing also ports which are installed only as
> dependencies, which I'd like to avoid - I'd like to list only "top
> level" ports, so that I don't build a dependency if top port doesn't
> need it.
>
> Is there a way to get dependency tree from pkg search?
>
> Thank you in advance,
>
This is usually done by:
pkg query -e '%a == 0' %o
which gives you the list of packages on your system, excluding those
that were automatically installed to fulfil dependencies. ie. it's
basically the collection of packages where you said 'pkg install foo' at
some point.
However, if you want to print out the dependency tree:
https://github.com/freebsd/pkg/blob/master/scripts/pkg_tree.sh
Cheers,
Matthew
More information about the freebsd-ports
mailing list