[Yum-devel] plugin to order downloads wrt size

Rakesh Pandit rakesh.pandit at gmail.com
Mon Jun 22 15:48:21 UTC 2009


2009/6/22 Seth Vidal wrote:
>
>
> On Mon, 22 Jun 2009, Rakesh Pandit wrote:
>
>> 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
>>
>>
>> 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 ?
>
> 1. dare I ask it - what difference does it make the order the pkgs are
> downloaded in?
>

it is useful for people on low bandwidth connections as it makes it
easier to get packages without having to cut a large download in
between and having it download all over again.

> 2. implementing your own downloadpkgs and overriding it is completely
> doomed.
>

May you suggest another way ? As I mentioned ordering was happening
between predownload and postdownload hook .. so I could not figure out
a better way, may you suggest?

Moreover I was also plaining to do a download-by-deps i.e say 'yum
install foo bar' will download foo and all its deps first and then bar
and remaining deps for same reason as mention above.

-- 
rakesh


More information about the Yum-devel mailing list