summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-07-20 11:41:45 +0300
committerTimo Teras <timo.teras@iki.fi>2009-07-20 11:41:45 +0300
commit89d1abe4e62b2ee5cb4b442ae0552b44ca217182 (patch)
tree058d4f89658e965fb3987df194dfcce96ec6913a
parenteca9c22205105eba20e1e28ddae8ad9da81c5323 (diff)
downloadapk-tools-89d1abe4e62b2ee5cb4b442ae0552b44ca217182.tar.gz
apk-tools-89d1abe4e62b2ee5cb4b442ae0552b44ca217182.tar.bz2
apk-tools-89d1abe4e62b2ee5cb4b442ae0552b44ca217182.tar.xz
apk-tools-89d1abe4e62b2ee5cb4b442ae0552b44ca217182.zip
db: write errors about repository update (fixes #70)
-rw-r--r--src/database.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/database.c b/src/database.c
index 331357a..40c6bf3 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1112,12 +1112,17 @@ int apk_repository_update(struct apk_database *db, struct apk_repository *repo)
r = apk_cache_download(db, &repo->csum, repo->url, apkindex_tar_gz,
APK_SIGN_VERIFY);
if (r == 0 || r == -10) {
+ if (r == -10)
+ apk_error("Failed to update %s: bad signature!");
apk_cache_delete(db, &repo->csum, apk_index_gz);
return r;
}
- return apk_cache_download(db, &repo->csum, repo->url, apk_index_gz,
- APK_SIGN_NONE);
+ r = apk_cache_download(db, &repo->csum, repo->url, apk_index_gz,
+ APK_SIGN_NONE);
+ if (r != 0)
+ apk_error("Failed to update %s: download failed");
+ return r;
}
struct apkindex_ctx {