From 9643bcbb5562b9c343add3b8f182263656c32687 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 19 Apr 2009 16:58:21 +0000 Subject: 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 --git a/config/global/download.in b/config/global/download.in index f571632..184d4ee 100644 --- a/config/global/download.in +++ b/config/global/download.in @@ -42,65 +42,33 @@ menuconfig USE_MIRROR 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. - - 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" + prompt "Prefer the 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 +config MIRROR_BASE_URL 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" + prompt "Base URL" 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/ + 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... 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 --git a/scripts/functions b/scripts/functions index 756f77d..44c9468 100644 --- a/scripts/functions +++ b/scripts/functions @@ -409,10 +409,9 @@ CT_GetFile() { # 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" -- cgit v0.10.2-6-g49f6