LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Visualization of package dependency graphs in SlackBuilds.org (https://www.linuxquestions.org/questions/slackware-14/visualization-of-package-dependency-graphs-in-slackbuilds-org-4175470545/)

gabrielmagno 07-22-2013 04:44 PM

Visualization of package dependency graphs in SlackBuilds.org
 
I'm learning to draw graphs using Graphviz and Networkx (python library), then I had the idea to put my skills in practice by analyzing the SlackBuilds.org packages dependency graph. It is probably not so useful, but I found it interesting to visualize some and I'm sharing here with you.


The full graph has 3,756 nodes (packages) and 2,535 edges (an edge from A to B means that package B requires package A to build). Unfortunately there is not a defined syntax for optional packages in SlackBuilds.org. Otherwise, they would be included with dashed lines in the edges.

Full graph figure: [PDF, 557 KiB]


There's a big weakly connected component (i.e. a group of packages that are all connected in some way) that contains 1,578 of all the packages. The second largest WCC contains only 86 packages, mostly related to Haskell. From all the packages, 1,651 don't have any dependence (isolated nodes).

Second largest WCC figure: [PDF, 56 KiB]


By looking at individual dependency graphs we can see all the packages that are necessary to build a particular package, and have an idea of the respective complexity. The 10 most "complex" packages, in terms of the number of packages required, are:
  1. mythplugins, 70 packages: [PNG, 411 KiB]
  2. shutter, 48 packages: [PNG, 249 KiB]
  3. spamassassin, 41 packages: [PNG, 219 KiB]
  4. xmltv, 36 packages: [PNG, 195 KiB]
  5. thunar-sendto-clamtk, 36 packages: [PNG, 179 KiB]
  6. clamtk, 35 packages: [PNG, 171 KiB]
  7. sopcast-player, 34 packages: [PNG, 144 KiB]
  8. vlc, 32 packages: [PNG, 138 KiB]
  9. perl-DateTime-Format-ISO8601, 32 packages: [PNG, 208 KiB]
  10. pandoc, 31 packages: [PNG, 227 KiB]

You can download the dependency graph of any package through the URL:

https://raw.github.com/gabrielmagno/SlackBuildsViz/master/queues/PACKAGE_NAME.png


You can also download the .sqf queue file for sbopkg through the URL:

https://raw.github.com/gabrielmagno/SlackBuildsViz/master/queues/PACKAGE_NAME.sqf

WARNING: The queue files were generated automatically, considering an order to build all the packages in the respective graph. Not only my scripts may be wrong, but also it is not recommended to blindly build packages without reading the README files. Use with care :-).


There's a GitHub repository in https://github.com/gabrielmagno/SlackBuildsViz for anyone interested in the scripts, graph data, graph information and other figures. Feedbacks are welcome.

BroX 07-22-2013 06:58 PM

Interesting! I will not be attempting to build mythplugins from source.

astrogeek 07-22-2013 07:59 PM

As you say, I am not sure how useful it might be, but it is a very interesting view of those relationships!

Didier Spaier 07-22-2013 09:08 PM

Interesting, Gabriel, thanks for sharing!

It happens that one of my sons plan to use Graphviz to represent relationships between components of a very big production system, so I just sent him a link to your post :cool:

solarfields 07-23-2013 03:13 AM

You rock dude!

qweasd 07-23-2013 07:41 AM

Nice. okular seems to be unable to show anything at > 100% zoom, I wonder why. inkscape and xpdf handle this file fine.

gabrielmagno 07-23-2013 07:04 PM

Quote:

Originally Posted by Didier Spaier (Post 4994965)
Interesting, Gabriel, thanks for sharing!

It happens that one of my sons plan to use Graphviz to represent relationships between components of a very big production system, so I just sent him a link to your post :cool:

Cool!

Quote:

Originally Posted by qweasd (Post 4995211)
Nice. okular seems to be unable to show anything at > 100% zoom, I wonder why. inkscape and xpdf handle this file fine.

Okular here stutters even for values lower than 100%.


solarfields, you gave me an idea: creating subgraphs of maintainers.

solarfields 07-24-2013 02:26 AM

Quote:

you gave me an idea: creating subgraphs of maintainers
I actually downloaded the graphs for all my SlackBuilds and realised I had a redundant dependency for gbgoffice. So I submitted an update to fix the information in the info file :)

brianL 07-24-2013 02:50 AM

WOW!!! That all.pdf looks like a colony of drunken spider's webs.
Nice work. :hattip:


All times are GMT -5. The time now is 05:36 PM.