xbps-repo: improve error msg if 'sync' target fails.

This commit is contained in:
Juan RP 2011-06-30 10:58:10 +02:00
parent f897ffa431
commit 8b43800e94

View File

@ -151,8 +151,9 @@ repo_sync_pkg_index_cb(struct repository_pool_index *rpi, void *arg, bool *done)
printf("Synchronizing package index for `%s' ...\n", rpi->rpi_uri); printf("Synchronizing package index for `%s' ...\n", rpi->rpi_uri);
rv = xbps_repository_sync_pkg_index(rpi->rpi_uri); rv = xbps_repository_sync_pkg_index(rpi->rpi_uri);
if (rv == -1) { if (rv == -1) {
xbps_error_printf("xbps-repo: failed to sync `%s': (%s %s)\n", xbps_error_printf("xbps-repo: failed to sync `%s': %s%s\n",
rpi->rpi_uri, strerror(rv), xbps_fetch_error_string()); rpi->rpi_uri, strerror(errno), xbps_fetch_error_string() ?
xbps_fetch_error_string() : "");
return rv; return rv;
} else if (rv == 0) { } else if (rv == 0) {
printf("Package index file is already up to date.\n"); printf("Package index file is already up to date.\n");