Friday, September 23, 2011

RPM dependency trees

Recently I wondered what the dependency tree for Aeolus looked like in Fedora. I knew we had a whole host of dependencies, but I thought it would be instructive to see it visually.

This has been mentioned in other blog posts in the past, but the basic procedure to do this on Fedora is:

# yum install rpmorphan graphviz
$ rpmdep -dot aeolus.dot aeolus-all
$ dot -Tsvg aeolus.dot -o aeolus.svg

The rpmorphan provides the rpmdep binary. The rpmdep binary is a perl script that runs through the RPM dependency information, outputting one digraph node per-line. Then we use dot (part of the graphviz package) to take that digraph information and generate an image out of it. In the above example I made it generate an SVG, but you can have it output PNG, JPEG, PDF, etc. The full list of what dot can do is here: http://www.graphviz.org/doc/info/output.html

1 comment:

  1. Or you can simply use repoquery which has both a ascii tree or a dot tree output now.
    It also allows you to set the length of the tree you want to browse (1st degree dependencies, 2nd degree, 3rd, all...).

    ReplyDelete