[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

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Apr 25 03:36:49 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=169748

Thomas Hurst <tom at hur.st> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tom at hur.st

--- Comment #4 from Thomas Hurst <tom at hur.st> ---
+               if (fetchStatURL(urls[i], &ustat, "") == -1) {
+                       snprintf(errormsg, sizeof(errormsg),
+                           "Error while determining file size for %s: %s\n",
+                           urls[i], fetchLastErrString);
+                       items[i*2 + 1] = "Failed";
+                       dialog_msgbox("Fetch Error", errormsg, 0, 0,
+                           TRUE);
+                       return (-1);
+               }

I'd suggest it best here just to quietly reset total_bytes = 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_progress_208/

i.e. *only* the first fetchStatURL() failed.  Resetting total_bytes to 0 would
have left them with a functional but coarse-grained total progress bar, while
this patch would have errored out the entire operation.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list