diff options
-rw-r--r-- | src/app_mkndx.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/app_mkndx.c b/src/app_mkndx.c index 6e485b5..b26c2ff 100644 --- a/src/app_mkndx.c +++ b/src/app_mkndx.c @@ -176,8 +176,22 @@ static int mkndx_parse_v2meta(struct apk_extract_ctx *ectx, struct apk_istream * return 0; } +static int mkndx_parse_v3meta(struct apk_extract_ctx *ectx, struct adb *db) +{ + struct mkndx_ctx *ctx = container_of(ectx, struct mkndx_ctx, ectx); + struct adb_obj obj; + + adb_r_rootobj(db, &obj, &schema_package); + + adb_val_t o = adb_wa_append(&ctx->pkgs, + adb_w_copy(&ctx->db, db, adb_ro_val(&obj, ADBI_PKG_PKGINFO))); + if (ADB_IS_ERROR(o)) return -ADB_VAL_VALUE(o); + return 0; +} + static const struct apk_extract_ops extract_ndxinfo_ops = { .v2meta = mkndx_parse_v2meta, + .v3meta = mkndx_parse_v3meta, }; static int mkndx_main(void *pctx, struct apk_ctx *ac, struct apk_string_array *args) |