Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Oct 2024 15:28:13 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 2f29060f4613 - stable/14 - pkg: improve error message
Message-ID:  <202410111528.49BFSDHW038296@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410111528.49BFSDHW038296>