[Yum-devel] [PATCH] Another yum history unicide fix, BZ 622683
James Antill
james at and.org
Tue Aug 10 15:28:38 UTC 2010
---
yum/__init__.py | 8 +++++++-
yum/history.py | 2 +-
yum/rpmsack.py | 3 +++
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/yum/__init__.py b/yum/__init__.py
index 0304fea..a5e3cd5 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -663,7 +663,7 @@ class YumBase(depsolve.Depsolve):
def _getUpdates(self):
"""setups up the update object in the base class and fills out the
updates, obsoletes and others lists"""
-
+ print "JDBG:", "getting .up."
if self._up:
return self._up
@@ -937,7 +937,13 @@ class YumBase(depsolve.Depsolve):
(rescode, restring) = self._doSkipBroken(rescode, restring, clear_skipped=False )
if self.tsInfo.pkgSack is not None: # rm Transactions don't have pkgSack
+ import debug_tm as dbg
+ dbg.out_mem = True
+ dbg.mark()
self.tsInfo.pkgSack.dropCachedData()
+ dbg.mark()
+ self.up = None
+ dbg.mark()
# This is a version of the old "protect-packages" plugin, it allows
# you to erase duplicates and do remove+install.
diff --git a/yum/history.py b/yum/history.py
index 6bc767a..014bdab 100644
--- a/yum/history.py
+++ b/yum/history.py
@@ -470,7 +470,7 @@ class YumHistory:
res = executeSQL(cur,
"""INSERT INTO trans_cmdline
(tid, cmdline)
- VALUES (?, ?)""", (self._tid, cmdline))
+ VALUES (?, ?)""", (self._tid, to_unicode(cmdline)))
return cur.lastrowid
def beg(self, rpmdb_version, using_pkgs, txmbrs, skip_packages=[],
diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index ae73c32..c5163a7 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -68,6 +68,9 @@ class RPMInstalledPackage(YumInstalledPackage):
def __getattr__(self, varname):
self.hdr = val = self._get_hdr()
self._has_hdr = True
+ print "JDBG:", "loading header for", self, varname
+ if True or not self.name.startswith("yum"):
+ alkfmalkfdmalmf
# If these existed, then we wouldn't get here ... and nothing in the DB
# starts and ends with __'s. So these are missing.
if varname.startswith('__') and varname.endswith('__'):
--
1.7.2
More information about the Yum-devel
mailing list