From 8b43800e94cd1c98272693017ea376c53e822778 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 30 Jun 2011 10:58:10 +0200 Subject: [PATCH] xbps-repo: improve error msg if 'sync' target fails. --- bin/xbps-repo/repository.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/xbps-repo/repository.c b/bin/xbps-repo/repository.c index 76e65247..7823fdc0 100644 --- a/bin/xbps-repo/repository.c +++ b/bin/xbps-repo/repository.c @@ -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); rv = xbps_repository_sync_pkg_index(rpi->rpi_uri); if (rv == -1) { - xbps_error_printf("xbps-repo: failed to sync `%s': (%s %s)\n", - rpi->rpi_uri, strerror(rv), xbps_fetch_error_string()); + xbps_error_printf("xbps-repo: failed to sync `%s': %s%s\n", + rpi->rpi_uri, strerror(errno), xbps_fetch_error_string() ? + xbps_fetch_error_string() : ""); return rv; } else if (rv == 0) { printf("Package index file is already up to date.\n");