summaryrefslogtreecommitdiff
path: root/src/repodata.c
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2013-05-27 16:27:24 +0200
committerMichael Schroeder <mls@suse.de>2013-05-27 16:27:24 +0200
commite3d077fb55f9aa2d3a53912ae0648876f2e370d0 (patch)
tree5c7aa1cc87755c25b12dfeae42cb29cea6c58133 /src/repodata.c
parent369513a6091c09dc10f20db508f79a3999ae30e2 (diff)
downloadlibsolv-e3d077fb55f9aa2d3a53912ae0648876f2e370d0.tar.gz
libsolv-e3d077fb55f9aa2d3a53912ae0648876f2e370d0.tar.bz2
libsolv-e3d077fb55f9aa2d3a53912ae0648876f2e370d0.zip
support a special Datapos that describes the repodata meta section
Diffstat (limited to 'src/repodata.c')
-rw-r--r--src/repodata.c14
1 files 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
{