From: Michael Schroeder Date: Mon, 27 May 2013 14:27:24 +0000 (+0200) Subject: support a special Datapos that describes the repodata meta section X-Git-Tag: upstream/0.4.0~128 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3d077fb55f9aa2d3a53912ae0648876f2e370d0;p=platform%2Fupstream%2Flibsolv.git support a special Datapos that describes the repodata meta section --- diff --git a/src/repodata.c b/src/repodata.c index c150e6f..9b4d352 100644 --- a/src/repodata.c +++ b/src/repodata.c @@ -568,17 +568,21 @@ solvid2data(Repodata *data, Id solvid, Id *schemap) unsigned char *dp = data->incoredata; if (!dp) return 0; - if (solvid == SOLVID_META) /* META */ - dp += 1; - else if (solvid == SOLVID_POS) /* META */ + if (solvid == SOLVID_META) + dp += 1; /* offset of "meta" solvable */ + else if (solvid == SOLVID_POS) { Pool *pool = data->repo->pool; if (data->repo != pool->pos.repo) return 0; if (data != data->repo->repodata + pool->pos.repodataid) return 0; - *schemap = pool->pos.schema; - return data->incoredata + pool->pos.dp; + dp += pool->pos.dp; + if (pool->pos.dp != 1) + { + *schemap = pool->pos.schema; + return dp; + } } else {