These files are for post-processing graphs generated by xdeb (but
could be used on graphs from other sources).

They are for operating on 'dot' files with 'gvpr' (found in the graphviz package)

Run this pipeline to do the whole process on a dot file:
  cat inputgraph.dot | sccmap | gvpr -f make_strict.g | gvpr -f colour_nodes.g
| dot -Tpdf > output.pdf


sccmap reduces the graph to the strongly-connected set. In the case of
a build-dep graph this produces the cyclic dependency sets (there can
be more than one).

This is what the scripts do:
1. make_strict.g:

This makes the graph exported by xdeb a 'strict' graph by combining
any duplicated edges and setting the weight of the combined edge to
the total number of original edges. It is recommended to always run
this command first to reduce graph complexity.

eg:
gvpr -f make_strict.g xdeb_out.dot > out_strict.dot

2. colour_nodes.g
This is likely to be the most useful tool for understanding dependency cycles

This calculates the combined weight of the paths leading OUT from a
node (which in the xdeb case is a measure of how many
build-dependencies a package has on other things) and puts that number
in brackets after the name. It also colours the node to reflect how
dependent that node is (more green = not very dependent, probably a
good place to start breaking loops). 

3. colour_cycle.g: [thanks to
https://mailman.research.att.com/pipermail/graphviz-interest/2007q3/004591.html]

This can be used to colour all the edges in a graph. We use it here to
colour the cycles ('loops' in the full dependency graph so that they
can be seen in often huge graphs).

For example (note that the filename scc.map is necessary, as colour_cycle.g 
explicitly references it)

sccmap xdeb_out.dot > scc.map
gvpr -c -f colour_cycle.g xdeb_out.dot > cycle_coloured.dot
