[Yum-devel] yum provides

seth vidal skvidal at linux.duke.edu
Thu Jan 12 06:08:18 UTC 2006


I was playing with yum provides today b/c of some work someone else was
doing and I realized how painfully it slow it is if you use any globs.


So I started looking at the sqlitesack code and figuring out where
things could be improved. Then I looked at the sqlite docs.

What I didn't realize is that sqlite's like operator supports 3
comparison options:

like (the sql %-capable comparison)
glob (a file-glob-based comparison)
regexp is an undefined function that we could define but doesn't appear
useful right now, but could be after I figure out how to use the
function definitions better.

However if we use the glob function we should be able to take care of
the common search case of yum provides /foo/bar/baz/*

to trim down the results and speed up the process.


additionally, I took the  'self.doRpmDBSetup()' out of the top of the
provides-searching method and put it only in place once we start
searching the rpmdb. It means that it is possible to use ctrl-c to
interrupt the search of the repositories.

so, that's what I just checked in.

-sv






More information about the Yum-devel mailing list