summaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/database.c b/src/database.c
index 5673c3c..16f8bb8 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1399,17 +1399,21 @@ static int load_apkindex(void *sctx, const struct apk_file_info *fi,
{
struct apkindex_ctx *ctx = (struct apkindex_ctx *) sctx;
struct apk_bstream *bs;
+ struct apk_repository *repo;
if (apk_sign_ctx_process_file(&ctx->sctx, fi, is) == 0)
return 0;
- if (strcmp(fi->name, "APKINDEX") != 0)
- return 0;
+ repo = &ctx->db->repos[ctx->repo];
- ctx->found = 1;
- bs = apk_bstream_from_istream(is);
- apk_db_index_read(ctx->db, bs, ctx->repo);
- bs->close(bs, NULL);
+ if (strcmp(fi->name, "DESCRIPTION") == 0) {
+ repo->description = apk_blob_from_istream(is, fi->size);
+ } else if (strcmp(fi->name, "APKINDEX") == 0) {
+ ctx->found = 1;
+ bs = apk_bstream_from_istream(is);
+ apk_db_index_read(ctx->db, bs, ctx->repo);
+ bs->close(bs, NULL);
+ }
return 0;
}