port rdeps [depth]?
René J. V. Bertin
rjvbertin at gmail.com
Tue Nov 24 02:08:41 PST 2015
Rainer Müller wrote:
> Sounds relatively easy, that is all just in base/src/port/port.tcl in
> proc action_dep.
Indeed, it seems the only thing somewhat tricky is to decide whether or not a
limiter in only the generating loop will be enough. For instance:
$ port rdeps zlib
xz
libiconv
gperf
gettext
expat
libiconv
gperf
ncurses
$ port rdeps zlib
xz
libiconv
gperf
gettext
expat
ncurses
If we set the depth limit to 3 and apply it only during the generating loop,
gettext's libiconv dependency will be recorded. It looks like the printer loop
will then print it, effectively violating the depth limit.
At the same time I presume that any processing time gain to be had will mostly
stem from limiting the generator loop?
> This would be more work. We already get info on all dependencies first,
> then walk the dependency tree while printing. For this proposal we would
> first need to spawn a tree in memory, then walk the tree to apply a
> filter removing nodes, then print the remaining tree.
True, but is it that much more work to "print the tree to memory" rather than to
output it, and add a very simple loop afterwards to print it (very simple
because it no longer has to filter out anything)?
R.
More information about the macports-dev
mailing list