mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] making HTTP proxy timeout adjustable
@ 2012-09-17  7:19 Schenk, Gavin
  2012-09-17  7:48 ` Juergen Beisert
  0 siblings, 1 reply; 5+ messages in thread
From: Schenk, Gavin @ 2012-09-17  7:19 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 2405 bytes --]

Hi all,

I recently migrated to 2012-09 and as usual I had to work around our companies HTTP proxy ...
... so what about something like:

diff -Naur orig/ptxdist-2012.09.0/config/setup/Kconfig ptxdist-2012.09.0/config/setup/Kconfig
--- orig/ptxdist-2012.09.0/config/setup/Kconfig  2012-09-06 18:13:48.000000000 +0200
+++ ptxdist-2012.09.0/config/setup/Kconfig      2012-09-17 09:12:02.274401151 +0200
@@ -56,6 +56,14 @@
                          http://your.proxy.org:80
+config SETUP_HTTP_PROXY_TIMEOUT
+          prompt "HTTP Proxy timeout"
+          int
+          default "30"
+          help
+            Set maximum timeout for downloads via a http proxy
+
+
endmenu
 menu "Project Searchpath"
diff -Naur orig/ptxdist-2012.09.0/config/setup/ptxdistrc.default ptxdist-2012.09.0/config/setup/ptxdistrc.default
--- orig/ptxdist-2012.09.0/config/setup/ptxdistrc.default 2012-09-06 18:13:48.000000000 +0200
+++ ptxdist-2012.09.0/config/setup/ptxdistrc.default     2012-09-17 09:11:43.399225416 +0200
@@ -18,7 +18,7 @@
#
PTXCONF_SETUP_FTP_PROXY=""
PTXCONF_SETUP_HTTP_PROXY=""
-
+PTXCONF_SETUP_HTTP_PROXY_TIMEOUT="30"
#
# Project Searchpath
#
diff -Naur orig/ptxdist-2012.09.0/scripts/lib/ptxd_make_get.sh ptxdist-2012.09.0/scripts/lib/ptxd_make_get.sh
--- orig/ptxdist-2012.09.0/scripts/lib/ptxd_make_get.sh  2012-09-06 18:13:48.000000000 +0200
+++ ptxdist-2012.09.0/scripts/lib/ptxd_make_get.sh      2012-09-17 09:03:42.069850814 +0200
@@ -43,6 +43,13 @@
           #
           local file="${url##*/}"
+          #
+          # Proxy timeout
+          local proxytimeout= ${PTXCONF_SETUP_HTTP_PROXY_TIMEOUT}
+          if [ -z proxytimeout ]; then
+                      proxytimeout=30
+          fi
+
           # remove any pending or half downloaded files
           rm -f -- "${path}."*
@@ -50,7 +57,7 @@
           wget \
               --passive-ftp \
               --progress=bar:force \
-               --timeout=30 \
+              --timeout=${proxytimeout} \
               --tries=5 \
               ${PTXDIST_QUIET:+--quiet} \
               "${opts[@]}" \


Regards
Gavin

Eckelmann Aktiengesellschaft
Vorstand: Dr.-Ing. Gerd Eckelmann (Vorsitzender)
Dr.-Ing. Peter Cordes, Dr.-Ing. Frank-Thomas Mellert
Vorsitzender des Aufsichtsrats: Hubertus G. Krossa
Sitz der Gesellschaft: Wiesbaden Amtsgericht Wiesbaden HRB 12636

[-- Attachment #1.2: Type: text/html, Size: 13765 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-17 19:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-17  7:19 [ptxdist] making HTTP proxy timeout adjustable Schenk, Gavin
2012-09-17  7:48 ` Juergen Beisert
2012-09-17  8:45   ` Schenk, Gavin
2012-09-17  8:55     ` Juergen Beisert
2012-09-17 19:18   ` Robert Schwebel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox