This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
[PATCH setup 1/5] Just retry download after error in unattended mode
- From: Ken Brown <kbrown at cornell dot edu>
- To: cygwin-apps at cygwin dot com
- Date: Fri, 10 Nov 2017 09:43:35 -0500
- Subject: [PATCH setup 1/5] Just retry download after error in unattended mode
- Authentication-results: sourceware.org; auth=none
- References: <20171110144339.12616-1-kbrown@cornell.edu>
After a download error, setup was going back to IDD_SITE. This is
pointless in unattended mode, since no changes in the mirrors or
packages can be made.
Change misleading comment about retries in unattended mode; the Yes/No
dialog is not used in that case.
---
download.cc | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/download.cc b/download.cc
index e561c24..f6aa6fc 100644
--- a/download.cc
+++ b/download.cc
@@ -244,11 +244,7 @@ do_download_thread (HINSTANCE h, HWND owner)
if (errors)
{
- /* In unattended mode, all dialog boxes automatically get
- answered with a Yes/OK/other positive response. This
- means that if there's a download problem, setup will
- potentially retry forever if we don't take care to give
- up at some finite point. */
+ // In unattended mode we retry the download, but not forever.
static int retries = 4;
if (unattended_mode && retries-- <= 0)
{
@@ -260,7 +256,8 @@ do_download_thread (HINSTANCE h, HWND owner)
{
Log (LOG_PLAIN) << "download error in unattended_mode: " << retries
<< (retries > 1 ? " retries" : " retry") << " remaining." << endLog;
- return IDD_SITE;
+ Progress.SetActivateTask (WM_APP_START_DOWNLOAD);
+ return IDD_INSTATUS;
}
else if (yesno (owner, IDS_DOWNLOAD_INCOMPLETE) == IDYES)
return IDD_SITE;
--
2.15.0