summaryrefslogtreecommitdiff
path: root/src/app_mkpkg.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2021-07-26 16:25:03 +0300
committerTimo Teräs <timo.teras@iki.fi>2021-07-27 14:09:38 +0300
commit9c843e4ecdfee916ec835b5d35c10b3818aba9e3 (patch)
treed2c703035bbdaa1f21ce0e8ed0cf121b7388f656 /src/app_mkpkg.c
parent2d4e88aeb1690220ce57420e8d1d9de327ae901d (diff)
downloadapk-tools-9c843e4ecdfee916ec835b5d35c10b3818aba9e3.tar.gz
apk-tools-9c843e4ecdfee916ec835b5d35c10b3818aba9e3.tar.bz2
apk-tools-9c843e4ecdfee916ec835b5d35c10b3818aba9e3.tar.xz
apk-tools-9c843e4ecdfee916ec835b5d35c10b3818aba9e3.zip
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.
Diffstat (limited to 'src/app_mkpkg.c')
-rw-r--r--src/app_mkpkg.c3
1 files changed, 2 insertions, 1 deletions
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;