config/global/download.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Jan 12 19:24:03 2010 +0100 (2010-01-12)
changeset 1761 88020b2c3246
parent 1295 38cf339a6ad0
child 1776 6144097af955
permissions -rw-r--r--
scripts/functions: change handling of nochdir

- 'nochdir' must be the first option
- have systematic pushd/popd, even if nochdir
     1 # Options specific to downloading packages
     2 
     3 comment "Downloading"
     4 
     5 config FORBID_DOWNLOAD
     6     bool
     7     prompt "Forbid downloads"
     8     default n
     9     help
    10       Normally, crosstool-NG will try to download missing tarballs (or
    11       checkout from CVS/SVN...).
    12       If you do not have network connectivity when you run crosstool-NG,
    13       and some files are missing, it can be a long time before crosstool-NG
    14       fails.
    15       
    16       Saying 'y' here will prevent crosstool-NG from downloading missing
    17       files, thus failing early so that you don't get stuck.
    18 
    19 if ! FORBID_DOWNLOAD
    20 
    21 config FORCE_DOWNLOAD
    22     bool
    23     prompt "Force downloads"
    24     default n
    25     help
    26       Force downloading tarballs, even if one already exists.
    27       
    28       Usefull if you suspect a tarball to be damaged.
    29 
    30 menuconfig USE_MIRROR
    31     bool
    32     prompt "Use LAN mirror"
    33     default n
    34     help
    35       If you have a machine on your LAN that mirrors some of the needed
    36       tarballs, you can say 'Y' here, and configure adequate values in
    37       the following options.
    38       
    39       Tarballs will be be preferably fetched from the LAN mirror, and if
    40       not found there, standard places will be searched for.
    41       
    42       Obviously, nothing prevents you from using a mirror that is in fact
    43       *not* on your LAN, for example on another subnet of your company's
    44       network, or a mirror on the Internet.
    45 
    46 if USE_MIRROR
    47 
    48 config PREFER_MIRROR
    49     bool
    50     prompt "Prefer the mirror"
    51     default n
    52     help
    53       Say 'Y' here if you prefer the LAN miror over the upstream sources.
    54 
    55 config MIRROR_BASE_URL
    56     string
    57     prompt "Base URL"
    58     default "http://ymorin.is-a-geek.org/mirrors/"
    59     help
    60       This is the base URL searched in for tarballs.
    61       
    62       I (Yann E. MORIN) have set up such a mirror to host snapshots of
    63       some components, when those snapshots are volatile on the upstream
    64       servers. The mirror is *slow*, because it is hosted behind an ADSL
    65       line. For the time being, I haven't set up bandwidth limitations,
    66       but should the mirror be abused, I will. Please avoid using my
    67       machine when you can... Also, no guarantee is made as to its
    68       availability. Use at your own risks.
    69       
    70       The mirror is available at:
    71         http://ymorin.is-a-geek.org/mirrors/
    72 
    73 config MIRROR_LS_R
    74     bool
    75 #    prompt "Use ls-lR et al."
    76     depends on EXPERIMENTAL
    77     default n
    78     help
    79       If the tarball was not found at the above location, see if the server
    80       has a ls-lr.gz (or similar) file, and use that file to see if the
    81       tarball is listed somewhere in that file.
    82       
    83       Common file names looked for are:
    84         ls-lrRt.txt     (used at ftp.gnu.org)
    85         find.txt        (ditto)
    86         ls-lR
    87 
    88 endif # USE_MIRROR
    89 
    90 config CONNECT_TIMEOUT
    91     int
    92     prompt "Connection timeout"
    93     default 10
    94     help
    95       From the curl manual:
    96         Maximum time in seconds that you allow the connection to the server to take.
    97       
    98       The scenario is as follows;
    99         - some enterprise networks have firewalls that prohibit FTP traffic, while
   100           still allowing HTTP
   101         - most download sites have http:// equivalent for the ftp:// URL
   102         - after this number of seconds, it is considered that the connection could
   103           not be established, and the next URL in the list is tried, until we reach
   104           an URL that will go through the firewall, most probably an http:// URL.
   105       
   106       If you have a slow network, you'd better set this value higher than the default
   107       10s. If you know a firewall is blocking connections, but your network is globally
   108       fast, you can try to lower this value to jump more quickly to allowed URLs. YMMV.
   109       
   110       Note that this value applies equally to wget if you have that installed.
   111 
   112 config DOWNLOAD_MAX_CHUNKS
   113     int
   114     prompt "Maximum number of // chunks"
   115     default 5
   116     range 1 10
   117     help
   118       If you have aria2 installed, then it will be used to download files.
   119       Aria2 can split the download in chunks, and download those chunks in //
   120       which can be interesting to speed up the download.
   121       
   122       On the other hand, using many chunks, or even chunking in general, may
   123       be seen by some site admins as being kind of unfair, or even as a DoS.
   124       That's why the range of acceptable values is [1..10], and the default
   125       is 5 (aria2's default).
   126 
   127 config ONLY_DOWNLOAD
   128     bool
   129     prompt "Stop after downloading tarballs"
   130     default n
   131     help
   132       Only download the tarballs. Exit once it done.
   133       
   134       Usefull to pre-retrieve the tarballs before going off-line.
   135 
   136 endif # ! FORBID_DOWNLOAD