From 9c843e4ecdfee916ec835b5d35c10b3818aba9e3 Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Mon, 26 Jul 2021 16:25:03 +0300 Subject: Refactor .apk extraction code This moves and isolates the tar code to tar.c. And the actual file extraction to disk is moved to extract.c. A new API is introduced and used for v2 file extraction. This essentially moves and isolates the apk_sign_ctx_* beast into extract_v2.c and offers a saner interface to handling packages. A place holder is added for v3 extraction. --- src/app_mkpkg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/app_mkpkg.c') diff --git a/src/app_mkpkg.c b/src/app_mkpkg.c index e68a426..b16ec2f 100644 --- a/src/app_mkpkg.c +++ b/src/app_mkpkg.c @@ -20,6 +20,7 @@ #include "apk_applet.h" #include "apk_database.h" #include "apk_pathbuilder.h" +#include "apk_extract.h" #include "apk_print.h" #define BLOCK_SIZE 4096 @@ -29,7 +30,7 @@ struct mkpkg_ctx { const char *files_dir, *output; struct adb db; struct adb_obj paths, *files; - struct apk_sign_ctx sctx; + struct apk_extract_ctx ectx; apk_blob_t info[ADBI_PI_MAX]; uint64_t installed_size; struct apk_pathbuilder pb; -- cgit v1.2.3-70-g09d2