Hi, On Thu, 7 Feb 2008, Jan Kupec wrote:
This is where the UI <-> library problems starts. What the wiki describes there is the description of a Selection.
That's just a problem of agreeing on usage of the words. I see no _real_ problem here. The bottom line is, the UIs need to show what's inside a pattern - libzypp must provide an API to enumerate something to display.
A pattern is more than a selectable. A selectable is an arbitrary set of solvables. A pattern OTOH can have dependencies, i.e. is a solvable itself.
Now for searching.
I have no opinion on the libzypp API for searches, but I can tell you what the satsolver library will provide (and partly provides already): It has a generic repo_search function. The results will be given to you via a callback function. It will accept strings and numbers, searching in one or all solvables, in one or all attributes, for substrings, globs or regexps, case sensitive or case insensitive. Via the callback you will be given the information of which solvable matches, in which attribute, and what the value of it is. Using the repo_search function will be much faster and take much less memory than implementing the searches by hand in libzypp (those would need to retrieve all attributes one by one, or (even worse) cache that data itself). Ciao, Michael. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org