Author: kkaempf Date: Tue Apr 8 15:30:34 2008 New Revision: 9461 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9461&view=rev Log: document arrays Modified: trunk/sat-solver/doc/README.attr Modified: trunk/sat-solver/doc/README.attr URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/doc/README.attr?rev=9461&r1=9460&r2=9461&view=diff ============================================================================== --- trunk/sat-solver/doc/README.attr (original) +++ trunk/sat-solver/doc/README.attr Tue Apr 8 15:30:34 2008 @@ -59,6 +59,8 @@ parameter to non-zero will store attribute string values separate from the Pool. + [Q: Whats the technical reason for the local pool?] + 3. You need space for the attributes @@ -83,6 +85,9 @@ repodata_extend(data, solvable - pool->solvables); + [Q: The offset passed to repodata_extend is per-pool. All other + repodata functions are per-repo. Why ?] + 4. Set attributes @@ -151,6 +156,43 @@ repodata_set_constant(data, datanum, attr_name, id); +4.6 Arrays + + Sometimes an attribute doesn't have a single value, but a varying + number of values. Here arrays come in handy. + + The attribute store knows about two types of arrays. Arrays of Ids + and arrays of strings. + + You fill an array by multiple calls to (array of Ids) + + repodata_add_idarray(data, datanum, attr_name, id) + + or + + repodata_add_poolstr_array(data, datanum, attr_name, "value") + + Every call will add the value to the end of the array. + + + [Q: can I mix Id and char* in one array ?] + + + +4.7 Other data types + + See repodata.h, there are + - checksum + - bin_checksum + - dirnumnum + - dirstr + + +4.8 Structural attribute types + + Structural attribute types are (currently) not supported. + + 5. Writing the .solv file Before writing out a .solv file, you need to internalize the -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org