From d99214ea559553f70ec52ea81d8e0e3ffafb6b1c Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Thu, 3 Sep 2015 13:20:48 +0300 Subject: db: stop extract more files if disk is full --- src/database.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/database.c b/src/database.c index b485004..ed7f10b 100644 --- a/src/database.c +++ b/src/database.c @@ -2294,7 +2294,7 @@ static int apk_db_install_archive_entry(void *_ctx, apk_blob_t name = APK_BLOB_STR(ae->name), bdir, bfile; struct apk_db_dir_instance *diri = ctx->diri; struct apk_db_file *file; - int r, type = APK_SCRIPT_INVALID; + int ret = 0, r, type = APK_SCRIPT_INVALID; r = apk_sign_ctx_process_file(&ctx->sctx, ae, is); if (r <= 0) @@ -2458,6 +2458,8 @@ static int apk_db_install_archive_entry(void *_ctx, case -ENOTSUP: ipkg->broken_xattr = 1; break; + case -ENOSPC: + ret = r; default: ipkg->broken_files = 1; break; @@ -2475,7 +2477,7 @@ static int apk_db_install_archive_entry(void *_ctx, } ctx->installed_size += ctx->current_file_size; - return 0; + return ret; } static void apk_db_purge_pkg(struct apk_database *db, -- cgit v1.2.3-70-g09d2