# HG changeset patch # User "Yann E. MORIN" # Date 1240160301 0 # Node ID 6fe8df60cfa473ecbbc49a881d85a220c94e93c2 # Parent 965237500806546f7d0814626995ca908ee1d0bb Simplify the mirror settings. -------- diffstat follows -------- /trunk/scripts/functions | 7 3 4 0 ++--- /trunk/config/global/download.in | 60 14 46 0 +++++++++++----------------------------------- 2 files changed, 17 insertions(+), 50 deletions(-) diff -r 965237500806 -r 6fe8df60cfa4 config/global/download.in --- a/config/global/download.in Sun Apr 19 16:38:30 2009 +0000 +++ b/config/global/download.in Sun Apr 19 16:58:21 2009 +0000 @@ -42,65 +42,33 @@ Obviously, nothing prevents you from using a mirror that is in fact *not* on your LAN, for example on another subnet of your company's network, or a mirror on the Internet. + +if USE_MIRROR + +config PREFER_MIRROR + bool + prompt "Prefer the mirror" + default n + help + Say 'Y' here if you prefer the LAN miror over the upstream sources. + +config MIRROR_BASE_URL + string + prompt "Base URL" + default "" + help + This is the base URL searched in for tarballs. I (Yann E. MORIN) have set up such a mirror to host snapshots of some components, when those snapshots are volatile on the upstream servers. The mirror is *slow*, because it is hosted behind an ADSL line. For the time being, I haven't set up bandwidth limitations, but should the mirror be abused, I will. Please avoid using my - machine when you can... - The mirror is available as (fill in those values in the fields - below): - host name: ymorin.is-a-geek.org - base dir : /mirrors - -if USE_MIRROR - -config PREFER_MIRROR - bool - prompt "Prefer the LAN mirror" - default n - help - Say 'Y' here if you prefer the LAN miror over the upstream sources. - -choice - bool - prompt "Server type:" - -config MIRROR_HTTP - bool - prompt "http" - -config MIRROR_FTP - bool - prompt "ftp" - -endchoice # Server type - -config MIRROR_SCHEME - string - default "http" if MIRROR_HTTP - default "ftp" if MIRROR_FTP - -config MIRROR_HOSTNAME - string - prompt "hostname" - default "" - help - Enter here the hostname on your LAN mirror. - -config MIRROR_BASE - string - prompt "Base directory" - default "" - help - This is the base directory searched for for tarballs. If you enter - /mirror, then the search is performed in the following directories - on the server: - /mirror// - /mirror/ + machine when you can... Also, no guarantee is made as to its + availability. Use at your own risks. - where is replaced with the actual package name. + The mirror is available at: + http://ymorin.is-a-geek.org/mirrors/ config MIRROR_LS_R bool diff -r 965237500806 -r 6fe8df60cfa4 scripts/functions --- a/scripts/functions Sun Apr 19 16:38:30 2009 +0000 +++ b/scripts/functions Sun Apr 19 16:58:21 2009 +0000 @@ -409,10 +409,9 @@ # Add URLs on the LAN mirror LAN_URLS= if [ "${CT_USE_MIRROR}" = "y" ]; then - CT_TestOrAbort "Please set the LAN mirror hostname" -n "${CT_MIRROR_HOSTNAME}" - CT_TestOrAbort "Please tell me where to find tarballs on the LAN mirror '${CT_MIRROR_HOSTNAME}'" -n "${CT_MIRROR_BASE}" - LAN_URLS="${LAN_URLS} ${CT_MIRROR_SCHEME}://${CT_MIRROR_HOSTNAME}/${CT_MIRROR_BASE}/${file%-*}" - LAN_URLS="${LAN_URLS} ${CT_MIRROR_SCHEME}://${CT_MIRROR_HOSTNAME}/${CT_MIRROR_BASE}" + CT_TestOrAbort "Please set the mirror base URL" -n "${CT_MIRROR_BASE_URL}" + LAN_URLS="${LAN_URLS} ${CT_MIRROR_BASE_URL}/${file%-*}" + LAN_URLS="${LAN_URLS} ${CT_MIRROR_BASE_URL}" if [ "${CT_PREFER_MIRROR}" = "y" ]; then CT_DoLog DEBUG "Pre-pending LAN mirror URLs"