[yum-commits] Branch 'yum-3_2_X' - 2 commits - yum/__init__.py
skvidal at osuosl.org
skvidal at osuosl.org
Wed Aug 4 11:50:19 UTC 2010
yum/__init__.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit e5b628917ef11fb976b461db9ae076f5ac623be3
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Tue Aug 3 17:14:09 2010 -0400
catch ValueErrors from .repo files and repo imports
make the errors tell the user more about where the issue is.
fixes https://bugzilla.redhat.com/show_bug.cgi?id=620101
diff --git a/yum/__init__.py b/yum/__init__.py
index 3f87f50..bb5eb64 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -447,7 +447,11 @@ class YumBase(depsolve.Depsolve):
@return: YumRepository instance.
'''
repo = yumRepo.YumRepository(section)
- repo.populate(parser, section, self.conf)
+ try:
+ repo.populate(parser, section, self.conf)
+ except ValueError, e:
+ msg = _('Repository %r: Error parsing config: %s' % (section,e))
+ raise Errors.ConfigError, msg
# Ensure that the repo name is set
if not repo.name:
commit 3bd970c36fe8bebbe2fb94292b02895dac303805
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Tue Aug 3 15:11:10 2010 -0400
add verifytransaction time output - so we can know how long it is taking
diff --git a/yum/__init__.py b/yum/__init__.py
index 6196e7a..3f87f50 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1408,7 +1408,8 @@ class YumBase(depsolve.Depsolve):
# that there is not also an install of this pkg in the tsInfo (reinstall)
# for any kind of install add from_repo to the yumdb, and the cmdline
# and the install reason
-
+
+ vt_st = time.time()
self.rpmdb.dropCachedData()
self.plugins.run('preverifytrans')
for txmbr in self.tsInfo:
@@ -1494,6 +1495,7 @@ class YumBase(depsolve.Depsolve):
self.plugins.run('historyend')
self.history.end(self.rpmdb.simpleVersion(main_only=True)[0], ret)
self.rpmdb.dropCachedData()
+ self.verbose_logger.debug('VerifyTransaction time: %0.3f' % (time.time() - vt_st))
def costExcludePackages(self):
""" Create an excluder for repos. with higher cost. Eg.
More information about the Yum-commits
mailing list