[Yum-devel] plugin to order downloads wrt size

Rakesh Pandit rakesh.pandit at gmail.com
Mon Jun 22 15:26:05 UTC 2009


Hello,

I have written a small plugin to order downloads as per size :
(users with variable bandwidth do find it useful)

http://rakesh.fedorapeople.org/yum/yum-download-order-0.1.tar.gz
http://rakesh.fedorapeople.org/srpm/yum-download-order-0.1-1.fc11.src.rpm
http://rakesh.fedorapeople.org/misc/yum-download-order-0.1-1.fc11.noarch.rpm

>From README file:

Usage
======

 Configure
 =========

 File: /etc/yum/pluginconf.d/download-order.conf

 Options: for downloadorder can be 'default', 'smallestfirst',
 'largestfirst' and by default 'smallestfirst' is selected.

 e.g
 [main]
 enabled=1
 downloadorder=smallestfirst


 Options with yum command
 ========================

 Yum command options will override configure file options.

 e.g yum --download-order=largestfirst install <packagename> or
     yum --download-order=smallestfirst install <packagename>


The problem which I faced was .. sorting of pkgs occurs between
predownload and postdownload hook using mediasort nested function
giving no direct access to use it. So, I used one of evil hacks (as
suggested by James in morning). I would like to patch up presto plugin
also .. in case this sorting is adjusted so that hooks can have access
to them .. as evil hacks I guess wouldn't be acceptable to presto
atleast.  Till the time this is done, I will have to update it as soon
as any change occurs in downloadPkgs function.

Suggestions and comments for improvement ?

Thanks,

-- 
Regards,
Rakesh Pandit


More information about the Yum-devel mailing list