/*seth vidal <skvi...@fedoraproject.org>*/ wrote on 05/16/2011 8:10:22 AM +0450:
On Sun, 2011-05-15 at 12:57 +0430, Hedayat Vatankhah wrote:
Hi all,
As you may already knew, still not having enough time to work on more
fundamental things, I've create a simple yum plugin[1] which tries to
take advantage of aria2c to provide faster downloads compared to current
URLGrabber. Currently, it is activated for downloading metadata dbs and
RPM packages. For the former, I override yum repo's _retrieveMD()
(calling the original function at the end to make sure that everything
is OK) and for the latter, I use a predownload hook.

First, any comments on the code is highly appreciated, specially as it
is my first serious yum code and it is not very long.

Then, suggestions for future enhancements are very welcome. I'm
specifically interested to be able to download metadata's in parallel,
and also downloading delta rpms. The latter is achievable by overriding
_getFile() when a whole file is going to be downloaded, but I would
prefer to find a solution which let me download multiple delta rpms in
parallel too. BTW, probably I should contact presto's author for this.

Anyway, I'm looking forward for any comments in this regard.

A few things spring to mind:

1. downloading code in a plugin is always going to be plagued with
issues - especially for yum-utils or other things using yum - like from
a gui (yumex or pk).
I should admit that I've not tried yum-utils after installing this plugin, however fortunately PK works fine with it. I had an issue with being run before presto, which forced me to rename the plugin so that it comes after presto alphabetically. I have not tried yumex too. :P

2. you'll want to make sure you offer a lot/all of the same capabilities
of urlgrabber - things like certificate-based authentication does
actually matter.
Yes, I'll try to add them gradually. And to use urlgrabber as a fallback when a feature is not supported.

3. Why not work on porting yum to using an external application call to
do downloads. If properly implemented, I think that code to make yum use
an external application to do downloads would be accepted into mainline
yum.
To be honest I didn't think that it will be accepted. But anyway, that's my bad; sorry for that. I'll start working on this. The first step will be a new download framework over the existing URLGrabber, which encourage download jobs to be submitted in groups rather than single files, and will notify the caller when each download is finished. I'll try to provide a working prototype/design soon.

Thanks,
Hedayat


-sv

_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to