diff options
author | Ludovic Courtès <ludovic.courtes@inria.fr> | 2021-09-17 10:13:15 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-09-21 15:15:52 +0200 |
commit | 5b32ad4f6f555d305659cee825879df075b06331 (patch) | |
tree | 41006f22dae8547c5b7a159e52bce284a438f533 /doc/guix.texi | |
parent | be32889902abc29c14f3ea9a4f52da1bf9a0383a (diff) |
graph: Add '--max-depth'.
* guix/graph.scm (export-graph): Add #:max-depth and honor it, adding
'depths' argument to 'loop'.
* guix/scripts/graph.scm (%options, show-help): Add '--max-depth'.
(%default-options): Add 'max-depth'.
(guix-graph): Pass #:max-depth to 'export-graph'.
* tests/graph.scm ("package DAG, limited depth"): New test.
* doc/guix.texi (Invoking guix graph): Document it.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r-- | doc/guix.texi | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index cd8e249ae8..b15a45a977 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12644,6 +12644,20 @@ $ guix graph --path -t references emacs libunistring /gnu/store/@dots{}-libunistring-0.9.10 @end example +Sometimes you still want to visualize the graph but would like to trim +it so it can actually be displayed. One way to do it is via the +@option{--max-depth} (or @option{-M}) option, which lets you specify the +maximum depth of the graph. In the example below, we visualize only +@code{libreoffice} and the nodes whose distance to @code{libreoffice} is +at most 2: + +@example +guix graph -M 2 libreoffice | xdot -f fdp - +@end example + +Mind you, that's still a big ball of spaghetti, but at least +@command{dot} can render it quickly and it can be browsed somewhat. + The available options are the following: @table @option |