English version (French version)

You might remember that sometime ago I played a bit with dependency tree, I have made it up to propose a patch to yum-utils to change repoquery directly.

This patch has been accepted and is now part of the latest version (v1.1.31) of yum-utils (currently in updates-testing).

There has therefore been quite some changes in repoquery. The old function --tree-* while still present and still working are no longer displayed in the --help.

In order to generate a similar output the command has changed to:

 for --tree-requires -> --requires --output=ascii-tree
 for --tree-conflicts -> --conflicts --output=ascii-tree
 for --tree-obsoletes -> --obsoletes --output=ascii-tree
 for --tree-whatrequires -> --whatrequires --output=ascii-tree

But you remember the last time you run --tree-requires R or something similar ? The output is really really big.

With this new version of repoquery comes the --level argument which enables you to specify how many levels you want to see (1,2,3..., all). So you can do

$ repoquery --requires R --output=ascii-tree --level=1
  R-2.13.1-1.fc15.x86_64 [cmd line]
   \_  R-devel-2.13.1-1.fc15.i686 [1: R-devel = 2.13.1-1.fc15]
   \_  R-devel-2.13.1-1.fc15.x86_64 [1: R-devel = 2.13.1-1.fc15]
   \_  libRmath-devel-2.13.1-1.fc15.i686 [1: libRmath-devel = 2.13.1-1.fc15]
   \_  libRmath-devel-2.13.1-1.fc15.x86_64 [1: libRmath-devel = 2.13.1-1.fc15]

or

$ repoquery --requires R --output=ascii-tree --level=2 
  R-2.13.1-1.fc15.x86_64 [cmd line]
   \_  R-devel-2.13.1-1.fc15.i686 [1: R-devel = 2.13.1-1.fc15]
   |   \_  R-core-2.13.1-1.fc15.i686 [1: R-core = 2.13.1-1.fc15]
   |   \_  R-core-2.13.1-1.fc15.x86_64 [1: R-core = 2.13.1-1.fc15]
   |   \_  bzip2-devel-1.0.6-3.fc15.i686 [1: bzip2-devel]
   |   \_  bzip2-devel-1.0.6-3.fc15.x86_64 [1: bzip2-devel]
   |   \_  gcc-c++-4.6.0-10.fc15.x86_64 [1: gcc-c++]
   |   \_  gcc-gfortran-4.6.0-10.fc15.i686 [1: gcc-gfortran]
   |   \_  gcc-gfortran-4.6.0-10.fc15.x86_64 [1: gcc-gfortran]
   |   \_  libX11-devel-1.4.3-1.fc15.i686 [1: libX11-devel]
   |   \_  libX11-devel-1.4.3-1.fc15.x86_64 [1: libX11-devel]
[...]
   \_  R-devel-2.13.1-1.fc15.x86_64 [1: R-devel = 2.13.1-1.fc15]
   |   \_  R-core-2.13.1-1.fc15.i686 [1: R-core = 2.13.1-1.fc15]
   |   \_  R-core-2.13.1-1.fc15.x86_64 [1: R-core = 2.13.1-1.fc15]
   |   \_  bzip2-devel-1.0.6-3.fc15.i686 [1: bzip2-devel]
[...]

But I promised repoquery could make us some pictures so check this:

$ repoquery --requires fedora-packager --output=dot-tree --level=2 > fedora-packager.dot
$ twopi -Tpng fedora-packager.dot -o fedora-packager-twopi.png

This gives you this nice pictures: fedora-packager-twopi.png

Another example:

$ repoquery --requires --output=dot-tree --level=1 R-Biobase R-tkWidgets R-DynDoc R-widgetTools > Rtree.dot
$ dot -Tpng Rtree.dot -o Rtree-dot.png

Which gives you this nice graph showing nicely the order in which this packages can be built: Rtree-dot.png