From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75884 invoked by alias); 10 Nov 2017 14:43:53 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 75280 invoked by uid 89); 10 Nov 2017 14:43:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=answered, finite X-HELO: limerock02.mail.cornell.edu Received: from limerock02.mail.cornell.edu (HELO limerock02.mail.cornell.edu) (128.84.13.242) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Nov 2017 14:43:50 +0000 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock02.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id vAAEhmSa016552; Fri, 10 Nov 2017 09:43:48 -0500 Received: from nothing.nyroc.rr.com (mta-68-175-129-7.twcny.rr.com [68.175.129.7] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id vAAEheGS015853 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 10 Nov 2017 09:43:47 -0500 From: Ken Brown To: cygwin-apps@cygwin.com Subject: [PATCH setup 1/5] Just retry download after error in unattended mode Date: Fri, 10 Nov 2017 14:43:00 -0000 Message-Id: <20171110144339.12616-2-kbrown@cornell.edu> In-Reply-To: <20171110144339.12616-1-kbrown@cornell.edu> References: <20171110144339.12616-1-kbrown@cornell.edu> X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00039.txt.bz2 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