index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dave Reisner <dreisner@archlinux.org> | 2011-08-16 20:10:22 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-16 19:37:14 -0500 |
commit | b008193c1255639f724e3f6c62e50e6f2619e3c2 (patch) | |
tree | b1bb514b26ae10fc9389909183741cba3be13af3 /lib/libalpm/sync.c | |
parent | cea6d7eb13e548cd148e42faebd81f6f219b0fb0 (diff) |
-rw-r--r-- | lib/libalpm/sync.c | 13 |
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 0c19efed..1807e709 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -738,11 +738,10 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas) const char *cachedir; alpm_list_t *i, *j; alpm_list_t *files = NULL; - enum _alpm_errno_t errsv = 0; + int errors = 0; cachedir = _alpm_filecache_setup(handle); handle->trans->state = STATE_DOWNLOADING; - handle->pm_errno = 0; /* Total progress - figure out the total download size if required to * pass to the callback. This function is called once, and it is up to the @@ -821,9 +820,9 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas) } } if(ret == -1) { + errors++; _alpm_log(handle, ALPM_LOG_WARNING, _("failed to retrieve some files from %s\n"), current->treename); - errsv = ALPM_ERR_RETRIEVE; } } @@ -844,13 +843,7 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas) handle->totaldlcb(0); } - /* set errno accordingly. an error occuring in the downloader itself will - * take precedence over a general retrieval error */ - if(handle->pm_errno == 0) { - handle->pm_errno = errsv; - } - - return handle->pm_errno > 0 ? -1 : 0; + return errors; } int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data) |