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
This commit is contained in:
Ed Maste 2024-10-07 12:33:12 -04:00
parent 9a73b5b1e8
commit be9243409d

View File

@ -855,7 +855,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");