https://bugzilla.novell.com/show_bug.cgi?id=435160
User mvyskocil@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=435160#c17
--- Comment #17 from Michal Vyskocil 2008-10-16 08:25:55 MDT ---
If the problem is in a parsing of UTF-8 regexp, this should be fixed in Python
side. I expect, that almost binaries available in packages for openSUSE
contains a ascii characters only. So you could try to convert an unicode string
term to ascii. If the python-satsolver works with arguments properly (detect
the unicode, vs normal strings), this should help.
diff --git a/scout/bin.py b/scout/bin.py
index 642c104..ded881f 100644
--- a/scout/bin.py
+++ b/scout/bin.py
@@ -17,7 +17,7 @@ class SolvParser(object):
etcpath = '/etc/zypp/repos.d'
solvfile = '/var/cache/zypp/solv/%s/solv'
# path regular expression for { /bin, /sbin, /usr/bin, /usr/sbin,
/usr/games, /opt/kde3/bin, /opt/kde3/sbin, /opt/gnome/bin, /opt/gnome/sbin }
- pathre = '^/(s?bin|usr/(s?bin|games)|opt/(kde3|gnome)/s?bin)/%s$'
+ pathre =
'^/(s?bin|usr/(s?bin|games)|opt/(kde3|gnome)/s?bin)/%s$'.encode("ascii")
def __init__(self):
self.pool = satsolver.Pool()
@@ -35,6 +35,10 @@ class SolvParser(object):
def search(self, term):
pkgmatch = []
+ try:
+ term = term.encode("ascii")
+ except UnicodeEncodeError:
+ pass
for repo in self.pool.repos():
for d in repo.search( self.pathre % term, satsolver.SEARCH_REGEX |
satsolver.SEARCH_FILES, None, 'solvable:filelist' ):
path = d.value()
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.