Quick question about +REQUIRED_BY files

Hi there, I tried a quick search in this forum for "REQUIRED_BY" but it only brought up one match which didn't answer my question.

In /var/db/pkg/$portname/+REQUIRED_BY there's obviously a list of ports which depend on $portname. My question is; does this file include every port in the whole dependency "chain", or does it only include ports which DIRECTLY depend on $portname?

Really quick question and I hope there's a really quick answer...

Thanks for your help!
 
Only direct dependencies. Those have dependencies that are listed in their own REQUIRED_BY files. In other words, it's a one-level-deep approach which can also be seen on a line-by-line basis in /usr/ports/INDEX-7 and at http://www.freebsd.org/ports.
 
Thanks for your answer, that's what I thought it should be. However, on my 7.1 system, I have the following:

Code:
[xxx@xxx /var/db/pkg/ca_root_nss-3.11.9_2]$ cat +REQUIRED_BY
curl-7.19.4
rtorrent-0.8.2_1

Which would seem to suggest that rtorrent has a direct dependency on ca_root_nss? But:

Code:
[xxx@xxx /usr/ports/net-p2p/rtorrent]$ grep DEP Makefile
BUILD_DEPENDS?= libtorrent=0.12.2:${PORTSDIR}/net-p2p/libtorrent
RUN_DEPENDS?=   libtorrent=0.12.2:${PORTSDIR}/net-p2p/libtorrent
LIB_DEPENDS?=   curl.5:${PORTSDIR}/ftp/curl
LIB_DEPENDS+=   xmlrpc.14:${PORTSDIR}/net/xmlrpc-c-devel

that doesn't seem to be the case? Instead it seems that rtorrent depends on curl, and curl depends on ca_root_nss, but ca_root_nss' +REQUIRED_BY contains everything in the chain right up to the original package which caused it to be installed?
 
Ah, OK, I see if I "grep rtorrent /usr/ports/INDEX-7" then rtorrent seems to depends on plenty of other things which aren't listed in its Makefile (ca_root_nss for one, perl, pkg-config, etc). I obviously have a little bit more to learn about the ports system before I ask any more questions!

Thanks for your help, I'll head off and have another look at the handbook :)
 
Also see the following make targets in any port dir:

Code:
make pretty-print-build-depends-list
make pretty-print-run-depends-list

and

Code:
make missing

(for a list of dependencies that have yet to be compiled to make that port work -- nothing will be built by this command)
 
Thanks, I've been using portmaster for most of the ports bits, and I've found the "portmaster --show-work" command which seems to be useful for showing which deps I'm currently missing.

Another question about the "make pretty-print-run-depends-list", I've just run it against rtorrent and it says it requires perl to run. However, I removed perl from my machine this morning after I ran "portmaster -l" and it was listed as a root port (ie nothing depends on it). I can still run rtorrent fine even on my system which no longer has perl installed, so is it still a runtime dependency?
 
Perl is a trunk port. There's an inordinate amount of ports depending on it ..
 
Code:
[xxx@yyy /var/db/pkg/perl-5.8.9_2]$ cat +REQUIRED_BY
autoconf-2.13.000227_6
p5-gettext-1.05_2
help2man-1.36.4_2
autoconf-2.62
automake-1.4.6_5
This is from another 7.1 machine, where portmaster lists perl as a trunk port like you said. However the original machine listed it as a root port, and therefore I removed it.

Is there an easy way of reinstalling any missing deps?
 
Thanks, I'm just portmastering perl, gmake and m4 manually (deps of rtorrent) then I'll try that command to show me missing deps from elsewhere in the tree.
 
Back
Top