This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Allow '-1' to be specified as CONNECTION_TIMEOUT to disable the use of the connection timeout for wget


# HG changeset patch
# User Cody Schafer <dev@codyps.com>
# Date 1399687622 25200
#      Fri May 09 19:07:02 2014 -0700
# Node ID cb33f8c2cbaf802d4f04b602b1969bd30adeaae0
# Parent  d13ded5cee5d4ce1dd18092606d96dc37aa32707
Allow '-1' to be specified as CONNECTION_TIMEOUT to disable the use of the connection timeout for wget

Signed-off-by: Cody P Schafer <dev@codyps.com>

diff --git a/config/global/download.in b/config/global/download.in
--- a/config/global/download.in
+++ b/config/global/download.in
@@ -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 --git a/scripts/functions b/scripts/functions
--- a/scripts/functions
+++ b/scripts/functions
@@ -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


--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]