[Yum-devel] [PATCH] repo.async = 'auto' option
james at fedoraproject.org
Wed Apr 18 14:42:04 UTC 2012
On Wed, 2012-04-18 at 10:11 -0400, Zdenek Pavlas wrote:
> > What is the desired behaviour difference between "on" and "auto" ...
> "1" when repo parsed from INI file via readRepoConfig().
> "0" when a plugin creates a YumRepository instance.
> "1" when repo parsed form INI file via readRepoConfig().
> "1" when a plugin creates a YumRepository instance.
Yeh, that's what I thought.
> > 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)
Right ... what I meant was that this change seems like a *plugin code
change (where * is _mostly_ rhn, but other things too). And will change
based on upgrade/downgrade of the plugin.
So it seems like a bad idea to let the user decide when it has happened
to all/any effected plugins ... really the code just needs to set a flag
saying "I'm RHNplugin and I'm fixed" :).
So it seems like we should have "on" do what "auto" does, and tell
rhnplugin to setup _async when they've fixed their code (or create some
flag way for "non-plain repos" to do the same).
> > say something like "yum will use parallel download, when it can".
Yeh, it's def. on the side of "we told you something, but you are
probably none the wiser" ... maybe we could say that and "which should
include all plain text repositories".
> > 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.
Yeh, that's what I meant ... AIUI those repos. can/should work, but
won't without more patches.
> The auto=>True "magic" is only in readRepoConfig().
> We want blocking _getFile() there.
We want async=False for repofrompath? Why?
More information about the Yum-devel