summaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-09-03 13:20:48 +0300
committerTimo Teräs <timo.teras@iki.fi>2015-09-03 13:20:59 +0300
commitd99214ea559553f70ec52ea81d8e0e3ffafb6b1c (patch)
tree604a482970587dc7f5309caaa4aafc3787ad2c9f /src/database.c
parent9ffa38222b9ee5e105f72f705c4449d548f3eb7b (diff)
downloadapk-tools-d99214ea559553f70ec52ea81d8e0e3ffafb6b1c.tar.gz
apk-tools-d99214ea559553f70ec52ea81d8e0e3ffafb6b1c.tar.bz2
apk-tools-d99214ea559553f70ec52ea81d8e0e3ffafb6b1c.tar.xz
apk-tools-d99214ea559553f70ec52ea81d8e0e3ffafb6b1c.zip
db: stop extract more files if disk is full
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c6
1 files 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,