Thanks, that makes sense.There's no real reason they shouldn't have loops.Shouldn't dependencies be loop free?
If package A and B are both required for each to work, then A depending on B and B depending on A is fine. Install either and the other gets installed to satisfy the dependency.
There's no real "loop" here.
I wanted to get a picture of the dependencies and used new bash script "mkgraphviz" ...
Code:
#!/bin/bashecho -e "digraph {\nrankdir=LR\nnode [shape=box]"for p in `cat a`dofor d in `cat depends/$p`do echo "\"$p\" -> \"$d\""donedoneecho "}"
Code:
pi@raspberrypi5:~/packages $ ./mkgraphviz > gra.dotpi@raspberrypi5:~/packages $ ccomps gra.dot > ccs.dotpi@raspberrypi5:~/packages $
To my surprise the graph is not connected.
But the 4 components other than the very big connected component 0 are small.
I deleted connected component 0 and did draw the graph with GraphvizFiddle.
Below is the result, can be vieweed in browser with GrapvizFidddle share link as well:
I get no nice picture of the unmodified created graph with neither dot nor neato layout engines.
But the edges of the reported circles from last to first vertex are a "feedback arc set".
The removal creates a DAG (Directed Acyclic Graph) and there are algorithms to draw them nicely.
Statistics: Posted by HermannSW — Tue Sep 10, 2024 8:58 pm