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:26:49 +0200
commit0fb0d304774630d53867fa3563dfd39246cc67b7 (patch)
treeb65d3ee173f4f7eab613c99487494d476a30965b /src/apk.c
parentb58d79e78f704233f7c412343b25f20c8fb5257c (diff)
downloadapk-tools-0fb0d304774630d53867fa3563dfd39246cc67b7.tar.gz
apk-tools-0fb0d304774630d53867fa3563dfd39246cc67b7.tar.bz2
apk-tools-0fb0d304774630d53867fa3563dfd39246cc67b7.tar.xz
apk-tools-0fb0d304774630d53867fa3563dfd39246cc67b7.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 f84d4aa..2ff7ce1 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -517,8 +517,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_err(out, "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_err(out, "Failed to open repository " BLOB_FMT " : %s", BLOB_PRINTF(name), apk_error_str(r));
goto err;
}