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

Zdeněk Pavlas zpavlas at redhat.com
Fri Apr 13 11:48:57 UTC 2012


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
         Repository.__init__(self, repoid)
 
         self.repofile = None
-- 
1.7.4.4



More information about the Yum-devel mailing list