[Yum-devel] [PATCH] Don't look for the releasever, if we are overridding it. BZ 727966.
James Antill
james at and.org
Thu Aug 18 15:28:09 UTC 2011
---
yum/__init__.py | 2 +-
yum/config.py | 9 +++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/yum/__init__.py b/yum/__init__.py
index 5bbf079..5fb7c00 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -321,7 +321,7 @@ class YumBase(depsolve.Depsolve):
# Try the old default
fn = '/etc/yum.conf'
- startupconf = config.readStartupConfig(fn, root)
+ startupconf = config.readStartupConfig(fn, root, releasever)
startupconf.arch = arch
startupconf.basearch = self.arch.basearch
if uuid:
diff --git a/yum/config.py b/yum/config.py
index b0fd4f8..e4674d1 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -943,7 +943,7 @@ class VersionGroupConf(BaseConfig):
run_with_packages = BoolOption(False)
-def readStartupConfig(configfile, root):
+def readStartupConfig(configfile, root, releasever=None):
"""Parse Yum's main configuration file and return a
:class:`StartupConf` instance. This is required in order to
access configuration settings required as Yum starts up.
@@ -974,8 +974,13 @@ def readStartupConfig(configfile, root):
raise Errors.ConfigError("All plugin search paths must be absolute")
# Stuff this here to avoid later re-parsing
startupconf._parser = parser
+
# setup the release ver here
- startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg)
+ if releasever is None:
+ releasever = _getsysver(startupconf.installroot,
+ startupconf.distroverpkg)
+ startupconf.releasever = releasever
+
uuidfile = '%s/%s/uuid' % (startupconf.installroot, startupconf.persistdir)
startupconf.uuid = get_uuid(uuidfile)
--
1.7.6
More information about the Yum-devel
mailing list