View previous topic :: View next topic |
Author |
Message |
Floe n00b
Joined: 20 Sep 2005 Posts: 19 Location: Munich, Germany
|
Posted: Thu Nov 22, 2007 4:48 pm Post subject: Meet your dependency graph up close! |
|
|
I have always wanted a more visual representation of the portage dependency graph, so I put together a little script:
Code: |
#!/bin/bash
cd /var/db/pkg
pkglist=$(find . -maxdepth 2 -type d | cut -c3- | grep /)
{
echo "// gentoo package dependency graph"
echo "// machine: $(hostname)"
echo "// started at: $(date)"
echo 'digraph depgraph {'
echo ' ranksep=1'
echo ' nodesep=1'
echo ' overlap=false'
for pkg in ${pkglist} ; do
equery depends =${pkg} | cut -d'(' -f1 | sed -e 's%\(.*\)% "\0" -> "'${pkg}'"%g'
done
echo '}'
}
#| tee depgraph.dot | twopi -Tps
|
Just pipe the output of this script into depgraph.dot and feed that into twopi (media-gfx/graphviz).
The only problem left now is finding an image viewer that can actually handle such a huge graph..
Yours, Florian
P.S. I know very well that this is entirely unelegant and slow. So please improve it! _________________ CU Floe |
|
Back to top |
|
|
Kasumi_Ninja Veteran
Joined: 18 Feb 2006 Posts: 1825 Location: The Netherlands
|
Posted: Thu Nov 22, 2007 7:25 pm Post subject: |
|
|
Kewl idea _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered |
|
Back to top |
|
|
dantrell l33t
Joined: 01 Jun 2007 Posts: 915 Location: Earth
|
Posted: Mon Apr 14, 2008 10:09 am Post subject: Re: Meet your dependency graph up close! |
|
|
Floe wrote: | [...]
The only problem left now is finding an image viewer that can actually handle such a huge graph..
[...] |
Did you find an image viewer for the dot file? _________________ Dantrell B. |
|
Back to top |
|
|
|