From: Michael Schroeder Date: Fri, 8 Apr 2011 11:33:21 +0000 (+0200) Subject: - fix constantid handling so that it also works in the standard cases. duh. X-Git-Tag: BASE-SuSE-Code-12_1-Branch~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc73098258f96523ae32f94d4dc1c4a4f8b2a449;p=thirdparty%2Flibsolv.git - fix constantid handling so that it also works in the standard cases. duh. --- diff --git a/ext/repo_write.c b/ext/repo_write.c index c22b220a..5d4e2892 100644 --- a/ext/repo_write.c +++ b/ext/repo_write.c @@ -1006,7 +1006,7 @@ repo_write(Repo *repo, FILE *fp, int (*keyfilter)(Repo *repo, Repokey *key, void struct extdata *xd; - Id type_constantid = 0; + Id type_constantid = REPOKEY_TYPE_CONSTANTID; memset(&cbdata, 0, sizeof(cbdata)); @@ -1471,7 +1471,7 @@ for (i = 1; i < target.nkeys; i++) * the correct string pool */ for (i = 1; i < target.nkeys; i++) { - if (type_constantid && target.keys[i].type == type_constantid) + if (target.keys[i].type == type_constantid) needid[target.keys[i].size].need++; needid[target.keys[i].name].need++; needid[target.keys[i].type].need++; @@ -1832,7 +1832,7 @@ fprintf(stderr, "dir %d used %d\n", i, cbdata.dirused ? cbdata.dirused[i] : 1); write_id(fp, needid[target.keys[i].type].need); if (target.keys[i].storage != KEY_STORAGE_VERTICAL_OFFSET) { - if (type_constantid && target.keys[i].type == type_constantid) + if (target.keys[i].type == type_constantid) write_id(fp, needid[target.keys[i].size].need); else write_id(fp, target.keys[i].size);