Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-05-05 09:58:00 -0500
committerDan McGee <dan@archlinux.org>2011-05-05 10:01:01 -0500
commit47de7973fd501e5253386c50178ec47e9f4c4c8e (patch)
tree92ca978b7c81a657c50cc21dc1607f8756e17793 /lib/libalpm
parent500a6f576d56c3152567df6c740998439b0e33b2 (diff)
dload: ensure we return success if we found files on any mirror
We were erroring out in the case where a first (possibly bogus) mirror would cause the download process to return a failure code, even though subsequent servers had the file. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/sync.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 4b42af4d..8dd51aaa 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -786,11 +786,11 @@ static int download_files(pmtrans_t *trans, alpm_list_t **deltas)
for(j = files; j; j = j->next) {
const char *filename = j->data;
alpm_list_t *server;
+ int ret = -1;
for(server = current->servers; server; server = server->next) {
const char *server_url = server->data;
char *fileurl;
size_t len;
- int ret;
/* print server + filename into a buffer */
len = strlen(server_url) + strlen(filename) + 2;
@@ -802,6 +802,8 @@ static int download_files(pmtrans_t *trans, alpm_list_t **deltas)
if(ret != -1) {
break;
}
+ }
+ if(ret == -1) {
errors++;
}
}