mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-31 16:36:14 +00:00
Add an option to forbid downloads.
Idea and code-base from Don Elwell <don@manifoldlabs.com>, adapted by me. /trunk/scripts/functions | 6 6 0 0 ++++++ /trunk/config/global/download.in | 18 18 0 0 ++++++++++++++++++ 2 files changed, 24 insertions(+)
This commit is contained in:
parent
a45c6b0232
commit
f326356874
@ -2,6 +2,22 @@
|
||||
|
||||
comment "Downloading"
|
||||
|
||||
config FORBID_DOWNLOAD
|
||||
bool
|
||||
prompt "Forbid downloads"
|
||||
default n
|
||||
help
|
||||
Normally, crosstool-NG will try to download missing tarballs (or
|
||||
checkout from CVS/SVN...).
|
||||
If you do not have network connectivity when you run crosstool-NG,
|
||||
and some files are missing, it can be a long time before crosstool-NG
|
||||
fails.
|
||||
|
||||
Saying 'y' here will prevent crosstool-NG from downloading missing
|
||||
files, thus failing early so that you don't get stuck.
|
||||
|
||||
if ! FORBID_DOWNLOAD
|
||||
|
||||
config FORCE_DOWNLOAD
|
||||
bool
|
||||
prompt "Force downloads"
|
||||
@ -281,3 +297,5 @@ config ONLY_DOWNLOAD
|
||||
Only download the tarballs. Exit once it done.
|
||||
|
||||
Usefull to pre-retrieve the tarballs before going off-line.
|
||||
|
||||
endif # ! FORBID_DOWNLOAD
|
||||
|
@ -480,6 +480,9 @@ CT_GetFile() {
|
||||
CT_GetLocal "${file}" ${first_ext} && return 0 || true
|
||||
# No, it does not...
|
||||
|
||||
# Are downloads allowed ?
|
||||
CT_TestAndAbort "File '${file}' not present locally, and downloads are not allowed" "${CT_FORBID_DOWNLOAD}" = "y"
|
||||
|
||||
# Try to retrieve the file
|
||||
CT_DoLog EXTRA "Retrieving '${file}'"
|
||||
CT_Pushd "${CT_TARBALLS_DIR}"
|
||||
@ -539,6 +542,9 @@ CT_GetCVS() {
|
||||
CT_GetLocal "${basename}" && return 0 || true
|
||||
# No, it does not...
|
||||
|
||||
# Are downloads allowed ?
|
||||
CT_TestAndAbort "File '${file}' not present locally, and downloads are not allowed" "${CT_FORBID_DOWNLOAD}" = "y"
|
||||
|
||||
CT_DoLog EXTRA "Retrieving '${basename}'"
|
||||
|
||||
CT_MktempDir tmp_dir
|
||||
|
Loading…
x
Reference in New Issue
Block a user