summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authormorganamilo <morganamilo@archlinux.org>2021-05-01 22:25:35 +0200
committerAllan McRae <allan@archlinux.org>2021-05-03 04:49:35 +0200
commitef14c3380da0ed0e3eeba7e8b6c66294db316883 (patch)
tree5400551360ecd74c5fd021aa26fbadf89c53ed59 /lib/libalpm
parent72238aa046b8a8de1c7b9110726986c7538023b5 (diff)
downloadpacman-ef14c3380da0ed0e3eeba7e8b6c66294db316883.tar.gz
pacman-ef14c3380da0ed0e3eeba7e8b6c66294db316883.tar.xz
libalpm: fix error when installing cached packages without signatures
With a repo using "SigLevel = Optional" and a package already downloaded into the cache, download_files() returns 1 (via _alpm_download) to indicate no files were downloaded. This causes installation of the package to fail. Explicitly check that download_files() returns -1 (error) rather than non-zero. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/sync.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 2419cc69..bdfab635 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -1128,7 +1128,7 @@ int _alpm_sync_load(alpm_handle_t *handle, alpm_list_t **data)
uint64_t total_bytes = 0;
alpm_trans_t *trans = handle->trans;
- if(download_files(handle)) {
+ if(download_files(handle) == -1) {
return -1;
}