[yum-git] 2 commits - cli.py output.py yum/rpmsack.py

James Antill james at linux.duke.edu
Sat Apr 12 05:22:10 UTC 2008


 cli.py         |    3 +++
 output.py      |    2 +-
 yum/rpmsack.py |    4 ++--
 3 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 75b667eb776bd63b9312b2429e578b3074da96c4
Author: James Antill <james at and.org>
Date:   Fri Apr 11 17:13:09 2008 -0400

     Allow searching for unicode, i.e.: ®
     This only didn't work for "search linux" on pl_PL, it works fine on
    pl_PL.UTF-8. And pl_PL doesn't work anyway for "search linux" due to ®
    not being displayable in iso8859_2 ... too much crack.

diff --git a/cli.py b/cli.py
index f4c044f..ae66555 100644
--- a/cli.py
+++ b/cli.py
@@ -45,6 +45,8 @@ from yum.rpmtrans import RPMTransaction
 import signal
 import yumcommands
 
+from yum.misc import to_unicode
+
 def sigquit(signum, frame):
     """ SIGQUIT handler for the yum cli. """
     print >> sys.stderr, "Quit signal sent - exiting immediately"
@@ -682,6 +684,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
             
         searchlist = ['name', 'summary', 'description', 'url']
         dups = self.conf.showdupesfromrepos
+        args = map(to_unicode, args)
         matching = self.searchGenerator(searchlist, args,
                                         showdups=dups, keys=True)
         
diff --git a/output.py b/output.py
index 4d835a8..1e3483f 100644
--- a/output.py
+++ b/output.py
@@ -266,7 +266,7 @@ class YumOutput:
         return ret
     
     def fmtSection(self, name, fill='='):
-        name = str(name)
+        name = to_str(name)
         cols = self.term.columns - 2
         name_len = len(name)
         if name_len >= (cols - 4):
commit fae350665b18ec256b4c7105fbd7aaad16023862
Author: James Antill <james at and.org>
Date:   Fri Apr 11 20:21:15 2008 -0400

    Fix bad translation by using replace, bug#440009

diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index 8f47bab..43058b9 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -28,7 +28,7 @@ from packageSack import PackageSackBase
 import fnmatch
 import re
 
-from misc import to_unicode
+from misc import to_unicode_maybe
 
 class RPMInstalledPackage(YumInstalledPackage):
 
@@ -298,7 +298,7 @@ class RPMDBPackageSack(PackageSackBase):
         count = 0
         for s in searchstrings:
             for field in fields:
-                value = to_unicode(hdr[field])
+                value = to_unicode_maybe(hdr[field])
                 if value and value.lower().find(s) != -1:
                     count += 1
                     break



More information about the Yum-cvs-commits mailing list