[Yum-devel] [PATCH] repo.async = 'auto' option

Zdenek Pavlas zpavlas at redhat.com
Wed Apr 18 14:11:37 UTC 2012


>  What is the desired behaviour difference between "on" and "auto" ...

auto:

"1" when repo parsed from INI file via readRepoConfig().
"0" when a plugin creates a YumRepository instance.

on:

"1" when repo parsed form INI file via readRepoConfig().
"1" when a plugin creates a YumRepository instance.

> are there any cases where you'd expect users to want to change from
> "auto" to "on"?

rhnplugin creates repositories with RhnRepo(channel), and I believe
the 'channel' object inherits options set in the INI file.

So when one believes _getFile() in the subclass can handle
parallel downloading, async=on should make yum use it.
(I hope I'm not wrong there)

> Explaining what "yum repositories" means here is going to be
> non-trivial, I think. I guess we could say "repos. loaded directly
> from a configuration file" or something ...

yep.. was thinking of 'plain repositories' vs 'repos created
dynamically by yum plugins'.

> say something like "yum will use parallel download, when it can".

:)

> AIUI things like repodiff/tmprepo/--repofrompath are all not going
> to work, without other patches (which is fine, but means we can't easily
> just say not-RHN or something).

--repofrompath should work, IMO.  YumRepository(repoid) uses the default
async=auto, so _async==False.  The auto=>True "magic" is only in readRepoConfig().
We want blocking _getFile() there.


More information about the Yum-devel mailing list