[Yum-devel] [PATCH] repo.async=False for RHN repositories

James Antill james at fedoraproject.org
Mon Apr 16 14:38:40 UTC 2012


On Fri, 2012-04-13 at 13:48 +0200, Zdeněk Pavlas wrote:
> rhnplugin.py subclasses YumRepository in a way that's
> incompatible with parallel downloader, so turn it off.
> 
> This should make multi-downloader work out-of box
> on systems with unpatched rhnplugin.
> ---
>  yum/yumRepo.py |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/yum/yumRepo.py b/yum/yumRepo.py
> index fdeb84d..4d64275 100644
> --- a/yum/yumRepo.py
> +++ b/yum/yumRepo.py
> @@ -252,6 +252,10 @@ class YumRepository(Repository, config.RepoConf):
>  
>      def __init__(self, repoid):
>          config.RepoConf.__init__(self)
> +        if self.async and self.__class__.__name__ == 'RhnRepo':
> +            # should be done in rhnplugin.py, but..
> +            logger.warning(_('Disabling parallel downloading for repo %s'), repr(repoid))
> +            self.async = False

 NAK, this is way too fragile. Testing what _getFile points to is maybe
a little better ... but still feels like a giant hack.

 Either leave it broken (maybe fine, but certainly not that nice) ... or
better have it default to off, and turn it in the cases where we know it
works.



More information about the Yum-devel mailing list