Date: Sat, 25 Apr 2020 03:36:48 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 169748] [patch] bsdinstall(8): when distfile fetch is complete on some distfiles, but not entire set, progress can go over 100%; installer gets confused with distfiles and halts Message-ID: <bug-169748-227-NoaVAL5J6q@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-169748-227@https.bugs.freebsd.org/bugzilla/> References: <bug-169748-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D169748 Thomas Hurst <tom@hur.st> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tom@hur.st --- Comment #4 from Thomas Hurst <tom@hur.st> --- + if (fetchStatURL(urls[i], &ustat, "") =3D=3D -1) { + snprintf(errormsg, sizeof(errormsg), + "Error while determining file size for %s: %s\n= ", + urls[i], fetchLastErrString); + items[i*2 + 1] =3D "Failed"; + dialog_msgbox("Fetch Error", errormsg, 0, 0, + TRUE); + return (-1); + } I'd suggest it best here just to quietly reset total_bytes =3D 0 and abort = trying to get the sizes up-front. HEAD requests failing isn't fatal, the code can fall back to just calculating percentage from the number of files. I've seen this sort of thing more than once: https://www.reddit.com/r/freebsd/comments/g7gdc9/is_that_normal_overall_pro= gress_208/ i.e. *only* the first fetchStatURL() failed. Resetting total_bytes to 0 wo= uld have left them with a functional but coarse-grained total progress bar, whi= le this patch would have errored out the entire operation. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-169748-227-NoaVAL5J6q>