# HG changeset patch # User Cody Schafer # Date 1399687622 25200 # Node ID d7eaba5831d5c872e47442fc3253cbd3720a5e78 # Parent 80e46e644bc0c788084071bcf480c5fc5823bfab scripts: add possibility to not override default connection timeout Allow '-1' to be specified as CONNECTION_TIMEOUT to disable the use of the connection timeout for wget. Signed-off-by: Cody P Schafer Message-Id: Patchwork-Id: 347582 diff -r 80e46e644bc0 -r d7eaba5831d5 config/global/download.in --- a/config/global/download.in Wed May 07 18:40:48 2014 +0200 +++ b/config/global/download.in Fri May 09 19:07:02 2014 -0700 @@ -47,6 +47,8 @@ Note that this value applies equally to wget if you have that installed. + If '-1' is specified, no timeout reconfiguration options are passed to wget/curl. + config ONLY_DOWNLOAD bool prompt "Stop after downloading tarballs" diff -r 80e46e644bc0 -r d7eaba5831d5 scripts/functions --- a/scripts/functions Wed May 07 18:40:48 2014 +0200 +++ b/scripts/functions Fri May 09 19:07:02 2014 -0700 @@ -572,9 +572,14 @@ # not easy to detect them, so force a global ${CT_CONNECT_TIMEOUT}-second # timeout. # For curl, no good progress indicator is available. So, be silent. + if [ ${CT_CONNECT_TIMEOUT} = -1 ]; then + T= + else + T="-T ${CT_CONNECT_TIMEOUT}" + fi if CT_DoExecLog ALL wget --passive-ftp --tries=3 -nc \ --progress=dot:binary \ - -T ${CT_CONNECT_TIMEOUT} \ + ${T} \ -O "${tmp}" \ "${url}" then