Date: Tue, 25 Aug 2009 03:25:15 +0000 From: "b. f." <bf1783@googlemail.com> To: freebsd-ports@FreeBSD.org Cc: andrew-freebsd@areilly.bpc-users.org Subject: Re: [HEADUP] FreeBSD Gecko's TODO and plan for future Message-ID: <d873d5be0908242025i70d0be9bpf13d908faa414904@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
>Is there any convenient way to list dependencies hierarchially, >rather than the flat set that pkg_info -r provides? Yes, there is the ports-mgmt/pkg_tree port, and if you want better or more flexible graphics, you could write a script to swing through parts of a ports tree, invoke make(1) to find direct dependencies, and then output the results in, for example, .dot format, so that they can then be drawn with graphics/graphviz. Obviously, there are other ways to do this as well. I use the following script to list the origins of all installed packages that are dependent upon a given package, according to the given ports tree: #!/bin/sh PORTSDIR=${PORTSDIR:-/usr/ports} if [ "`pkg_info -E $1`" ] then dir1="`pkg_info -oq $1`" for pdir in `pkg_info -aoq` do pdepends="`make -C $PORTSDIR/$pdir -V FETCH_DEPENDS -V EXTRACT_DEPENDS -V PATCH_DEPENDS -V BUILD_DEPENDS -V RUN_DEPENDS -V LIB_DEPENDS`" ( echo "$pdepends" | grep -q -s -e "$dir1" ) && echo "$pdir" #or, if you prefer: #echo `make -C $PORTSDIR/$pdir -V PKGNAME` done else echo "$1 is not a valid package name" exit 1 fi exit 0 b.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d873d5be0908242025i70d0be9bpf13d908faa414904>