MultiDistroTools
What is MultiDistroTools ?
multidistrotools is a package providing lots of small scripts useful to MOTUs and other Debian derivatives developers. Currently, it particularly targets scripts dealing with lists of packages (all software written in ruby, all science-related software), allowing the user to get a global view of the packages it cares about. But the scope of multidistrotools might be larger in the future.
The multidistrotools package provides /usr/bin/mdt. This executable is a wrapper for a lot of other small scripts which reside in /usr/share/multidistrotools. Those scripts can be run directly, but it is easier to run them through mdt.
More info
Scripts in /usr/share/multidistrotools should do only one thing, but do it well. Scripts longer than 50 lines should really be exceptions.
Scripts in /usr/share/multidistrotools can be written in whatever language one want. However, limiting ourselves to a small set of languages and tools might be a good idea. The packages needed to run those scripts is listed as Recommends, because the user might not want to run all the scripts.
Scripts are coded in a smart way, allowing chaining. They should read their input from stdin as much as possible, and use stdout and stderr' for output. Currently, multidistrotools depends on ruby, because /usr/bin/mdt is written in this language. However, /usr/bin/mdt is less than 100 lines, so you can rewrite it in python if this dependancy bothers you too much.
Scripts needed: download Packages and Sources files for a distribution (Debian, Ubuntu) and a section (main, contrib, non-free, universe, multiverse) in a local folder ( Recursive dependancies of something (using Depends, Recommends or Suggests) done: depends (but still need more love to select distribution and dependancy type) Recursive reverse dependancies of something (using Depends, Recommends or Suggests) done: depends Filter a file containing data with a list of packages done: filter Build a list of source packages from a list of binary packages done: src2bin Set theory on package lists : union, intersection, difference, substraction, etc. So one can build exactly the list one want. done: list_*
(Working with multidistrotools >= 0.0.9) Here are some example results.
motu-tools is a set of scripts written by ReinhardTartler, StephanHermann and others. Those scripts (lpbugs.py, lpmerge.py) aims at easing the merge process. At some point, they might (or not) be merged into multidistrotools. This hasn't been discussed yet.
LucasNussbaum's branch: bzr branch http://ox.blop.info/bazaar/multidistrotools/
Build the package: dpkg-buildpackage -rfakeroot -us -uc -I.bzrTODO / DONE list
~/.multidistrotools/ ?) done Real life example
# because we will generate some temporary files
cd /tmp
# get all packages recursively depending on libruby1.8
mdt depends --reverse libruby1.8 > binpkg
# get the sources packages for those binary packages
mdt bin2src < binpkg > srcpkg
# Update our package lists (Packages and Sources files)
if [ ! -d $HOME/.multidistrotools/sid ]; then
mdt dist-create sid http://ftp.debian.org/debian unstable main contrib non-free
fi
if [ ! -d $HOME/.multidistrotools/dapper ]; then
mdt dist-create dapper http://archive.ubuntu.com/ubuntu dapper main restricted universe multiverse
fi
mdt dist-apt-get sid update
mdt dist-apt-get dapper update
# Lists versions in Debian and Ubuntu
mdt compare-versions sid dapper > versionslist
# Filter this versions list with the list of ruby-related sources packages
mdt filter srcpkg < versionslist > rubyversionslist
# Generate an HTML report from rubyversionslist
mdt versions2html < rubyversionslist > rubyversionslist.html
multidistrotools and motu-tools: what's the difference ?
Development info
How can you help ?
Branches
Building the package
Read the README if you're interested in adding your scripts.
MultiDistroTools (last edited 2008-08-06 16:18:59 by localhost)