index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Anatol Pomozov <anatol.pomozov@gmail.com> | 2020-01-29 21:27:10 -0800 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2020-01-31 00:38:36 +1000 |
commit | 886a6677a847a5b7fdc1e44240f90cc81d91b9ad (patch) | |
tree | 2f02657317056fb08c61c5e2c6b6e213f2042cb1 /lib | |
parent | d0c487d4dcc6fec6f4bd8e1cefa1de9ffbe0e460 (diff) |
-rw-r--r-- | lib/libalpm/sync.c | 14 |
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index d02a435f..4d93f41f 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -705,16 +705,14 @@ static struct dload_payload *build_payload(alpm_handle_t *handle, return payload; } -static int find_dl_candidates(alpm_db_t *repo, alpm_list_t **files) +static int find_dl_candidates(alpm_handle_t *handle, alpm_list_t **files) { - alpm_list_t *i; - alpm_handle_t *handle = repo->handle; - - for(i = handle->trans->add; i; i = i->next) { + for(alpm_list_t *i = handle->trans->add; i; i = i->next) { alpm_pkg_t *spkg = i->data; - if(spkg->origin != ALPM_PKG_FROM_FILE && repo == spkg->origin_data.db) { + if(spkg->origin != ALPM_PKG_FROM_FILE) { char *fpath = NULL; + alpm_db_t *repo = spkg->origin_data.db; if(!repo->servers) { handle->pm_errno = ALPM_ERR_SERVER_NONE; @@ -802,9 +800,7 @@ static int download_files(alpm_handle_t *handle) handle->totaldlcb(total_size); } - for(i = handle->dbs_sync; i; i = i->next) { - errors += find_dl_candidates(i->data, &files); - } + errors += find_dl_candidates(handle, &files); if(files) { /* check for necessary disk space for download */ |