git: 2f29060f4613 - stable/14 - pkg: improve error message
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 11 Oct 2024 15:28:13 UTC
The branch stable/14 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=2f29060f46138bbfc52c5944825293d598cc68de
commit 2f29060f46138bbfc52c5944825293d598cc68de
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-10-07 16:33:12 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-10-11 15:27:42 +0000
pkg: improve error message
Print the complete list of url that have failed
PR: 281924
Co-authored-by: Baptiste Daroussin <bapt@FreeBSD.org>
Differential Revision: https://reviews.freebsd.org/D46983
(cherry picked from commit be9243409d6be99f5d7815b6d074a85a6e84f7ce)
---
usr.sbin/pkg/pkg.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c
index b78565b9437a..bb42526f56cb 100644
--- a/usr.sbin/pkg/pkg.c
+++ b/usr.sbin/pkg/pkg.c
@@ -856,7 +856,11 @@ bootstrap_pkg(bool force, const char *fetchOpts)
goto cleanup;
fetchfail:
- warnx("Error fetching %s: %s", url, fetchLastErrString);
+ for (int j = 0; bootstrap_names[j] != NULL; j++) {
+ warnx("Attempted to fetch %s/Latest/%s", packagesite,
+ bootstrap_names[j]);
+ }
+ warnx("Error: %s", fetchLastErrString);
if (fetchLastErrCode == FETCH_RESOLV) {
fprintf(stderr, "Address resolution failed for %s.\n", packagesite);
fprintf(stderr, "Consider changing PACKAGESITE.\n");