[zypp-devel] PoolQuery
Hi, i committed a version of PoolQuery that currently supports basic queries like: PoolQuery q; q.addString("zypper"); q.addAttribute(sat::SolvAttr::name); for_each(q.begin(), q.end(), do_something_wih_solvables); see PoolQuery_test testsuite for more examples The query string can be set globally with addString(string) and per-attribute with addAttribute(attr, string). If you use addAttribute(attr) without the query string, you are supposed to use at least one addString() to add a global query string (otherwise you did not set any condition for the attribute). To sum it up: Curretnly supported and tested: * zero or one search string for each attribute * zero, one or multiple attributes (== condition only) A solvable matches if ANY of the attributes matches do we also want ALL condition? * ALL or one repository * case-(in)sensitive search, exact value search (need test cases for these) Not tested/planned (starting with the highest priority): * drop non-matching kinds (or move this to the sat solver) (easy) * support regexes (incl. wildcards) * add addAttribute(SolvAttr, string, Rel) to enable >,<,>=,<= conditions. (probably harder) * enable addDep() (shouldn't be hard) * multiple search strings (will use regex to comine them). * different values for different attributes * multiple repositories * enable setMatchWord() (should be easy once regexes are working) ---- * somewhere in between - beautify & optimize & make the code politically correct * one special high-priority task: an adapter to PoolQuery which would return Selectables (ui::SelectablePoolQuery perhaps). Help with advices/patches appreciated. Cheers, jano -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Mon, Apr 07, Jan Kupec wrote:
Hi,
i committed a version of PoolQuery that currently supports basic queries like:
Help with advices/patches appreciated.
zypp/PoolQuery.h: extern "C" { #include "satsolver/repo.h" } Please avoid satsolver/ include in zypp public header files. Applications should not depend on satsolver internal structures like ::_Dataiterator. These are details zypp is expected to hide. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Michael Andres wrote:
On Mon, Apr 07, Jan Kupec wrote:
Hi,
i committed a version of PoolQuery that currently supports basic queries like:
Help with advices/patches appreciated.
zypp/PoolQuery.h:
extern "C" { #include "satsolver/repo.h" }
Please avoid satsolver/ include in zypp public header files. Applications should not depend on satsolver internal structures like ::_Dataiterator. These are details zypp is expected to hide.
Yes, i was aware of this, planned. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (2)
-
Jan Kupec
-
Michael Andres