From: Michael Schroeder Date: Mon, 19 Mar 2012 10:35:28 +0000 (+0100) Subject: - store rpmdbid as TYPE_NUM. This means that TYPE_U32 is actually no longer used... X-Git-Tag: BASE-SuSE-Code-12_2-Branch~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=d2b47004c22a7df3b92eaa8cbbb3a42ea32d047e;p=platform%2Fupstream%2Flibsolv.git - store rpmdbid as TYPE_NUM. This means that TYPE_U32 is actually no longer used and can be deleted in the future --- diff --git a/src/repo.c b/src/repo.c index 9e67a52..f5db371 100644 --- a/src/repo.c +++ b/src/repo.c @@ -853,7 +853,7 @@ Repokey repo_solvablekeys[RPM_RPMDBID - SOLVABLE_NAME + 1] = { { SOLVABLE_SUGGESTS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE }, { SOLVABLE_SUPPLEMENTS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE }, { SOLVABLE_ENHANCES, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE }, - { RPM_RPMDBID, REPOKEY_TYPE_U32, 0, KEY_STORAGE_SOLVABLE }, + { RPM_RPMDBID, REPOKEY_TYPE_NUM, 0, KEY_STORAGE_SOLVABLE }, }; static void @@ -980,6 +980,7 @@ repo_search_md(Repo *repo, Id p, Id keyname, struct matchdata *md) if (repo->rpmdbid) { kv.num = repo->rpmdbid[p - repo->start]; + kv.num2 = 0; repo_matchvalue(md, s, 0, repo_solvablekeys + (RPM_RPMDBID - SOLVABLE_NAME), &kv); } if (keyname || md->stop > SEARCH_NEXT_KEY) diff --git a/src/repo_write.c b/src/repo_write.c index 1db6c50..b666d3b 100644 --- a/src/repo_write.c +++ b/src/repo_write.c @@ -1072,7 +1072,7 @@ repo_write_filtered(Repo *repo, FILE *fp, int (*keyfilter)(Repo *repo, Repokey * else if (i < RPM_RPMDBID) keyd.type = REPOKEY_TYPE_REL_IDARRAY; else - keyd.type = REPOKEY_TYPE_U32; + keyd.type = REPOKEY_TYPE_NUM; keyd.size = 0; keyd.storage = KEY_STORAGE_SOLVABLE; if (keyfilter) @@ -1696,7 +1696,7 @@ fprintf(stderr, "dir %d used %d\n", i, cbdata.dirused ? cbdata.dirused[i] : 1); if (s->enhances && cbdata.keymap[SOLVABLE_ENHANCES]) data_addidarray_sort(xd, pool, needid, idarraydata + s->enhances, 0); if (repo->rpmdbid && cbdata.keymap[RPM_RPMDBID]) - data_addu32(xd, repo->rpmdbid[i - repo->start]); + data_addid(xd, repo->rpmdbid[i - repo->start]); if (anyrepodataused) { cbdata.vstart = -1;