From e3d077fb55f9aa2d3a53912ae0648876f2e370d0 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Mon, 27 May 2013 16:27:24 +0200 Subject: [PATCH] support a special Datapos that describes the repodata meta section --- src/repodata.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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 { -- 2.7.4