From: Michael Matz Date: Fri, 7 Dec 2007 21:43:39 +0000 (+0000) Subject: Work around the schema problem for now without changing the SOLV format. X-Git-Tag: BASE-SuSE-Code-12_1-Branch~1071 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a52b984d359cb88798989c62b6e4823f9226a97;p=platform%2Fupstream%2Flibsolv.git Work around the schema problem for now without changing the SOLV format. The Repo writer doesn't account the the zero element at schemadata[0], and starts counting schemas with 0, the attr store reserves schema ID 0 for the empty schema. So the attr store explicitely needs to store that too, otherwise the repo reader will be confused. --- diff --git a/tools/attr_store.c b/tools/attr_store.c index 437f5d7..b5a0a7c 100644 --- a/tools/attr_store.c +++ b/tools/attr_store.c @@ -897,9 +897,9 @@ write_attr_store (FILE *fp, Attrstore *s) s->keys[i].name = str2id (s->pool, localid2str (s, s->keys[i].name), 0); } - write_id (fp, s->szschemata - 1); - Id *ids = s->schemata + 1; - for (i = 1; i < s->nschemata; i++) + write_id (fp, s->szschemata); + Id *ids = s->schemata + 0; + for (i = 0; i < s->nschemata; i++) ids = write_idarray (fp, ids); assert (ids == s->schemata + s->szschemata);