[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] Add compatibility back in for older versions of Yum.



Jeffrey C. Ollie wrote:
We would like for Koji to remain compatible with the version of Yum
that is shipped with RHEL 5.

Signed-off-by: Jeffrey C. Ollie <jeff ocjtech us>
---
 builder/mergerepos |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/builder/mergerepos b/builder/mergerepos
index defb8c1..cfa3a8d 100755
--- a/builder/mergerepos
+++ b/builder/mergerepos
@@ -95,10 +95,13 @@ class RepoMerge(object):
         self.mdconf.verbose = True
         self.mdconf.changelog_limit = 3
         self.yumbase = yum.YumBase()
-        self.yumbase.preconf.fn = '/dev/null'
-        self.yumbase.preconf.init_plugins = False
-        self.yumbase.preconf.debuglevel = 2
-        self.yumbase._getConfig()
+        if hasattr(self.yumbase, 'preconf'):
+            self.yumbase.preconf.fn = '/dev/null'
+            self.yumbase.preconf.init_plugins = False
+            self.yumbase.preconf.debuglevel = 2
+            self.yumbase._getConfig()
+        else:
+            self.yumbase._getConfig('/dev/null', init_plugins=False, debuglevel=2)
         self.yumbase.conf.cachedir = tempfile.mkdtemp()
         self.yumbase.conf.cache = 0
         self.archlist = arches

Applied, thanks for the patch!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]