yum plugins

One of the big advantages of yum over other solutions is the ability to extend the tool with plugins. One of these plugins is, as I already mentioned, the “installonlyn” plugin which takes care of the fact that only a certain number of different kernel versions is installed on a system at the same time.
Yesterday I installed and tested two other yum plugins to check how they work.

The first plugin is “fastestmirror” which aims at kepping a list cached with information about the fastest mirror. The background is that yum can handle mirror lists on the fly, changing them even inside of one task if a mirror brakes down or whatever. One of the main advantages is here that the load of all servers is balanced since yum chooses the mirrors by chance. The disadvantage is that you sometimes get very slow mirrors on the other side of the world. To avoid this the plugin “fastestmirror” checks the mirrors now and then and keeps in background which one is the fastest – and forces yum to use this and only this one. Of course a list is kept for each repository.
The output looks lik this (if the verbose flag in /etc/yum/pluginconf.d/fastestmirror.conf is set):

* fedora.bu.edu : 0.111618 secs
http://www.gtlib.cc.gatech.edu already timed: 0.136567115784
* http://www.gtlib.cc.gatech.edu : 0.136567 secs
mirror.clarkson.edu already timed: 0.379370212555
* mirror.clarkson.edu : 0.379370 secs

This list goes on, for each mirror you will find one entry. The result is pretty nice, btw.: I now have almost full download speed every time – and I do not have to care about such stuff, even when some main mirrors will brake down I still get the one which is the fastest available from my position. Additionally that is quite nice for laptop users who have to update their machine through different networks when they change the place where they stay.

The second plugin I tested were the “changelog” plugin. It provides you with the changelog data of each updated package before or after teh installation (depending on what you have configured; the default is pre). So if you invoke yum with the changelog option: yum --changelog update you will get additional output like:

celestia - 1.4.1-1.fc5.i386
* Wed Mar 29 00:00:00 2006 Steven Pritchard 1.4.1-1
- Update to 1.4.1
- Use "pkg-config --libs gtkglext-x11-1.0 libgnomeui-2.0" instead of
"pkg-config --libs gtk+-2.0"

Although you could argue about the sense of viewing the changelog of celestia it makes pretty much sense to see a changelog before you update a kernel or other system important files since their could be useful information inside.

If you are using yum, test these plugins (and others which are available) – they are worth it. If youa re not using yum, think about it, it is a very useful tool and the plugin interface makes it even more powerful. And if you want to have a challenge: try to write a plugin by yourself. I for instance need a “updateonshutdown” plugin (in contrast to the already existing “updateonboot” plugin), so give it a try🙂