summaryrefslogtreecommitdiff
path: root/src/apk.c
diff options
context:
space:
mode:
authorthibault.ferrante <thibault.ferrante@gmail.com>2021-01-07 17:21:36 +0100
committerTimo Teräs <timo.teras@iki.fi>2021-01-11 11:31:30 +0200
commit39f5bfd26ab10a754a566fcd238ca2cac5916f91 (patch)
tree364d5d2a8d48ef0467e6dc667d5a5d44761fded6 /src/apk.c
parentd438cdfbeb13b0f38c0bef321fc767926df0e4e1 (diff)
downloadapk-tools-39f5bfd26ab10a754a566fcd238ca2cac5916f91.tar.gz
apk-tools-39f5bfd26ab10a754a566fcd238ca2cac5916f91.tar.bz2
apk-tools-39f5bfd26ab10a754a566fcd238ca2cac5916f91.tar.xz
apk-tools-39f5bfd26ab10a754a566fcd238ca2cac5916f91.zip
database: Propagate errors when loading an APKINDEX
In case of failure when loading an APKINDEX, no errors are propagated to the user which may uncorrectly interpret the current problem.
Diffstat (limited to 'src/apk.c')
-rw-r--r--src/apk.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/apk.c b/src/apk.c
index 6b3e700..ee51c79 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -547,8 +547,9 @@ int main(int argc, char **argv)
name = spec;
}
- if (apk_db_index_read(&db, apk_istream_from_file(AT_FDCWD, name.ptr), repo) != 0) {
- apk_error("Failed to open repository: " BLOB_FMT, BLOB_PRINTF(name));
+ r = apk_db_index_read(&db, apk_istream_from_file(AT_FDCWD, name.ptr), repo);
+ if (r != 0) {
+ apk_error("Failed to open repository " BLOB_FMT " : %s", BLOB_PRINTF(name), apk_error_str(r));
goto err;
}