diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-08-23 01:07:35 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-23 07:49:14 +0200 |
commit | 6731d0a9407e00f755d237e889c2e3f5db9cd276 (patch) | |
tree | f627201a26fb2fd6a37eaea03f623dd5f3e25c27 /lib/libalpm | |
parent | dddd6a46a01167f4cfdae1133da34a6d245c9bde (diff) | |
download | pacman-6731d0a9407e00f755d237e889c2e3f5db9cd276.tar.gz pacman-6731d0a9407e00f755d237e889c2e3f5db9cd276.tar.xz |
sync: halt file discovery if repo has no servers
This avoids error spam when no servers are configured for a repo and a
sync operation is performed:
Proceed with installation? [Y/n] y
:: Retrieving packages from testing...
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/sync.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index b048777c..3b31899a 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -796,6 +796,14 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas) for(i = handle->dbs_sync; i; i = i->next) { alpm_db_t *current = i->data; + if(!current->servers) { + handle->pm_errno = ALPM_ERR_SERVER_NONE; + _alpm_log(handle, ALPM_LOG_ERROR, "%s: %s\n", + alpm_strerror(handle->pm_errno), current->treename); + errors++; + continue; + } + for(j = handle->trans->add; j; j = j->next) { alpm_pkg_t *spkg = j->data; |