File yum-3.1.7.patch of Package yum

--- yum/rpmsack.py
+++ yum/rpmsack.py
@@ -105,7 +105,7 @@
         ts = self.readOnlyTS()
         result = {}
         
-        mi = ts.dbMatch('basenames', name)
+        mi = ts.dbMatch('basenames', name.encode('us-ascii'))
         for hdr in mi:
             pkg = self._makePackageObject(hdr, mi.instance())
             if not result.has_key(pkg.pkgid):
@@ -120,7 +120,7 @@
         ts = self.readOnlyTS()
         result = {}
         tag = self.DEP_TABLE[prcotype][0]
-        mi = ts.dbMatch(tag, name)
+        mi = ts.dbMatch(tag, name.encode('us-ascii'))
         for hdr in mi:
             po = self._makePackageObject(hdr, mi.instance())
             prcotup = (name, None, (None, None, None))