Fedora-Fr - Communauté francophone Fedora - Linux

Planet de Fedora-Fr : la communauté francophone autour de la distribution Linux Fedora

A propos

Cette page est actualisée toutes les heures.

Cette page est une sélection de blogs autour de Fedora. Fedora-Fr.org décline toute responsabilité au sujet des propos tenus par les auteurs des blogs de ce planet. Leurs propos sont leur entière responsabilité.

Le contenu de ce planet appartient à leurs auteurs respectifs. Merci de consulter leur blogs pour obtenir les licences respectives.

Mot-clefs : pydot

Dependency graph v2

Pierre-Yves Chibon

source.png

Small update about the dependency graph story.

Quelques nouvelles sur cette histoire de graphique de dépendances.

English version (Pas de française)

Few days ago (one week to be precise), I was presenting a small python script to generate dependency graph.

I was then pointed that, it is similar to rpmorphan, that it does not deal with Provides and that the story was anyway more complicated than what I was doing. So it was nice but unfinished business.

Yesterday, akurtakov asks me if I could have a look at

repoquery --tree-requires <package>

and see if I could make a dot file out of it.

So I gave it a shot and wrote generateDependencyList2.py. This script takes a folder with spec files or a given package name, runs repoquery --tree-requires <package> and parse the output to generate a SVG picture of the first level dependencies.

This was nice and looked nice until sochotni asked this morning if we could get the same picture but for the command:

repoquery --tree-whatrequires <package>

Of course, the script works in the same way, but it is kinda quick and dirty solution. So I decided that the best would actually to try to get this within repoquery.

After speaking with Seth I therefore wrote another small python script (package-graph.py) which I have submitted for comments on yum-devel. If this work out, we should be able to quickly and simply get the graph of packages depending / requiring the given package.

Feel free to test this new version and make RFE :-)




To use it:

  • Download the script from http://pingou.fedorapeople.org/package-graph.py
  • Put it in /usr/bin (it needs repoquery's code)
  • package-graph.py --package=foo > foo.dot
  • twopi -Tsvg -O foo.dot
  • eog foo.dot.svg

Dependency graph

Pierre-Yves Chibon

source.png

A small script to generate the dependency graph from spec file

Un petit script pour générer le graph des dépendances à partir de fichier spec

English version

I maintain some R packages which have a quite nice dependency graph. Every time I fight to find back the order in which I should build them. So yesterday I started a small script which would give me the dependencies in a graph so that I could see the information I am looking for.

I came up with a small python script relying on pydot.

The last version is available there: http://project.pingoured.fr/misc/file/12447ca38f25/generateDependencyList.py

You run it as:

$ python generateDependencyList.py -f ~/GIT/
dependencygraph.svg has been generated

The output can look like this dependencygraph.png or dependencygraph-2.png (These pictures has been converted from svg to png and reduced)

sochotni pointed out that it actually does a similar job than rpmorphan, too bad, it was fun to do :-)