[yum-commits] Branch 'yum-3_2_X' - 2 commits - yum/history.py yum/__init__.py

James Antill james at osuosl.org
Mon Aug 9 17:04:43 UTC 2010


 yum/__init__.py |    1 +
 yum/history.py  |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 2e86bc689b2f72b5393337fe78ca369bb1eeb7cf
Author: James Antill <james at and.org>
Date:   Mon Aug 9 11:14:50 2010 -0400

    Fix unicide with rpmdb problems being logged in history, BZ 608956

diff --git a/yum/history.py b/yum/history.py
index 6a485d8..6bc767a 100644
--- a/yum/history.py
+++ b/yum/history.py
@@ -425,12 +425,15 @@ class YumHistory:
         cur = self._get_cursor()
         if cur is None or not self._update_db_file_2():
             return None
+        # str(problem) doesn't work if problem contains unicode(),
+        # unicode(problem) doesn't work in python 2.4.x ... *sigh*.
+        uproblem = to_unicode(problem.__str__())
         res = executeSQL(cur,
                          """INSERT INTO trans_rpmdb_problems
                          (tid, problem, msg)
                          VALUES (?, ?, ?)""", (self._tid,
                                                problem.problem,
-                                               to_unicode(str(problem))))
+                                               uproblem))
         rpid = cur.lastrowid
 
         if not rpid:
commit c8a315136e0a38dd56a9a8af45123dd2b613f72a
Author: James Antill <james at and.org>
Date:   Mon Aug 9 10:09:11 2010 -0400

    Fix unicide on remove of provides errors, BZ 622222

diff --git a/yum/__init__.py b/yum/__init__.py
index bb5eb64..0304fea 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -3680,6 +3680,7 @@ class YumBase(depsolve.Depsolve):
                         self.logger.critical(_('%s') % e)
                     
                     if not depmatches:
+                        arg = to_unicode(arg)
                         self.logger.critical(_('No Match for argument: %s') % arg)
                     else:
                         pkgs.extend(depmatches)


More information about the Yum-commits mailing list