port rdeps [depth]?

Rainer Müller raimue at macports.org
Mon Nov 16 02:23:30 PST 2015


On 2015-11-11 11:59, René J.V. Bertin wrote:
> Still working on those KF5 frameworks, which come in different tiers
> that correspond to the level of inter-frameworks dependencies: tier 2
> frameworks can depend on tier 1 frameworks (which don't depend on
> other KF5 stuff), tier 3 frameworks can depend on tier 2s and/or tier
> 1s, and so up to tier 4 (currently). Checking the dependency tree via
> rdeps can become non-trivial quickly for the higher level tiers
> because of dependencies on non-KF5 ports that aren't very relevant
> during those checks.
> 
> Adding a depth limit to the rdeps algorithm should reduce the size
> and complexity of the dependency graph; how hard would it be to
> implement that?

Sounds relatively easy, that is all just in base/src/port/port.tcl in
proc action_dep.

As a workaround for the time being, you can filter on the whitespace
prefix in the output. For example this reduces the output to two levels
only:

  port rdeps --full qt4-mac |grep -E '^(  ){,2}[^ ]'

> BTW, Adding a pattern filter would probably useful too, but much more
> complex if the graph isn't already generated completely before being
> printed (= you'd want to print out the full path leading to the
> dependency on a matching port - otherwise a simple pipe to grep would
> suffice).

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.

Rainer


More information about the macports-dev mailing list