[Yum-devel] [PATCH][RFC] Optimizing SqliteSack
Florian Festi
ffesti at redhat.com
Thu Dec 20 11:44:02 UTC 2007
Florian Festi wrote:
> Tim Lauridsen wrote:
>> seth vidal wrote:
>>> On Tue, 2007-12-18 at 18:00 +0100, Florian Festi wrote:
>>>
>>>> I changed Package.hash to ._hash to avoid API clutter.
>>>> Responsiveness in file-resolutions shouldn't be affected by the
>>>> ._files change. Filelists aren't loaded anyway. Or are you talking
>>>> about the searchFiles implementation?
>>>
>>> For people searching files the bad way (by iterating the filelists of
>>> all packages). I was just making sure we're not stepping on anything
>>> there.
>>>
>>
>> I have implemented a gui filter in packagekit yum backend in the "Bad"
>> way :).
>> I am iterating over the the filelists for all packages looking for
>> files starting with '/usr/share/application/'.
>> It looks like it is still working with the current yum HEAD.
>>
>> Any suggestion on how to look for '/usr/share/application/*.desktop' i
>> a good way.
>
> Depsolve.pkgSack.getProvides('/usr/share/application/*.desktop') should
> work.
Ehm, no. searchProvides() is it. Looks like there is a bit a inconsistency
in SqliteSack.getProvides(). It is not supposed to do any globbing but it
calls .searchFiles which does globbing. This shouldn't hurt many people as
filenames containing * and ? are rare. Nevertheless I am going to add an
strict param to searchFiles() that will default to False.
Florian
More information about the Yum-devel
mailing list