bugs: smart on fc5
Gustavo Niemeyer
gustavo at niemeyer.net
Wed Apr 12 06:48:44 PDT 2006
> there are currently 3 places where the smart sources have to be edited
> in order to get search, query and info working on fedora core 5:
>
> (1) query.py, line 281:
>
> if hasdescription:
> for pattern in hasdescription:
> if pattern.search(info.getDescription()):
> newpackages[pkg] = True
>
> should be changed into:
>
> if hasdescription:
> desc = info.getDescription()
> if desc:
> for pattern in hasdescription:
> if pattern.search(desc):
> newpackages[pkg] = True
Are you able to tell why this is needed? The default description is
an empty string, which should work fine with the logic currently
there.
> (2) query.py, line 504:
>
> if self.opts.show_summary:
> info = pkg.loaders.keys()[0].getInfo(pkg)
> print "-", info.getSummary()
>
> should be changed into:
>
> if self.opts.show_summary:
> info = pkg.loaders.keys()[0].getInfo(pkg)
> print "-", info.getSummary().encode('utf-8')
(...)
This shouldn't be needed if your terminal is correctly setup either.
Smart will convert these strings to the preferred encoding
automatically (converting straight to utf-8 would break anyone
that doesn't use it).
--
Gustavo Niemeyer
http://niemeyer.net
More information about the Smart
mailing list