introduce Solvable.kind to remove the need for strcmp()/strchr() when
authorKlaus Kaempf <kkaempf@suse.de>
Thu, 7 Feb 2008 08:53:19 +0000 (08:53 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Thu, 7 Feb 2008 08:53:19 +0000 (08:53 +0000)
commit65503b9344f9e5246844ce58c72691a66489aa47
tree1fca738a72ddb305565ee790ae9b826a0a4d927e
parent48efc15fc6092516c0550a2696b0c551c79a3074
introduce Solvable.kind to remove the need for strcmp()/strchr() when
accessing the name in libzypp and other applications.
Its also in preparation of per-kind solving (not implemented yet).

The name prefix (e.g. "pattern:") is still kept but only needed for
capability matching. kind is implemented as an offset (unsigned int)
matching the length of the name prefix. Applications can simply use
(solvable.name + solvable.kind) to strip the prefix from the name.

To prevent name clashes, "product:" was renamed to "prod:". Being
seldomly used, this seems to be acceptable.

Missing understandable documentation on the format of .solv files, the
kind value is currently NOT stored but computed on read.
tools/repo_susetags.c is already prepared to write the kind, solv
version6 should support storing kind values in .solv files.
src/pool.c
src/pooltypes.h
src/repo_solv.c
src/solvable.h
tools/dumpsolv.c
tools/repo_susetags.c
tools/repo_write.c