# HG changeset patch # User "Yann E. MORIN" # Date 1259177764 -3600 # Node ID 184a960d2fc88757c237ef640eff135ee3ca57aa # Parent ffdf4dc4b58202b1f0a698e8f4dc34b6a41cc6fb scripts/functions: do not double check if downloads are allowed Only call the *_get functions if downloads are allowed, so there is no need to check it again in the retrieval wrappers. diff -r ffdf4dc4b582 -r 184a960d2fc8 scripts/crosstool-NG.sh.in --- a/scripts/crosstool-NG.sh.in Tue Jan 05 23:27:19 2010 +0100 +++ b/scripts/crosstool-NG.sh.in Wed Nov 25 20:36:04 2009 +0100 @@ -489,19 +489,23 @@ fi if [ -z "${CT_RESTART}" ]; then - CT_DoStep INFO "Retrieving needed toolchain components' tarballs" - do_kernel_get - do_gmp_get - do_mpfr_get - do_ppl_get - do_cloog_get - do_mpc_get - do_binutils_get - do_cc_get - do_libc_get - do_tools_get - do_debug_get - CT_EndStep + if [ "${CT_FORBID_DOWNLOAD}" = "y" ]; then + CT_DoLog INFO "Downloading forbidden by configuration, skipping downloads" + else + CT_DoStep INFO "Retrieving needed toolchain components' tarballs" + do_kernel_get + do_gmp_get + do_mpfr_get + do_ppl_get + do_cloog_get + do_mpc_get + do_binutils_get + do_cc_get + do_libc_get + do_tools_get + do_debug_get + CT_EndStep + fi if [ "${CT_ONLY_DOWNLOAD}" != "y" ]; then if [ "${CT_FORCE_EXTRACT}" = "y" ]; then diff -r ffdf4dc4b582 -r 184a960d2fc8 scripts/functions --- a/scripts/functions Tue Jan 05 23:27:19 2010 +0100 +++ b/scripts/functions Wed Nov 25 20:36:04 2009 +0100 @@ -448,9 +448,6 @@ 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}" @@ -512,9 +509,6 @@ CT_GetLocal "${basename}" && return 0 || true # No, it does not... - # Are downloads allowed ? - CT_TestAndAbort "File '${basename}' not present locally, and downloads are not allowed" "${CT_FORBID_DOWNLOAD}" = "y" - CT_DoLog EXTRA "Retrieving '${basename}'" CT_MktempDir tmp_dir @@ -554,9 +548,6 @@ CT_GetLocal "${basename}" && return 0 || true # No, it does not... - # Are downloads allowed ? - CT_TestAndAbort "File '${basename}' not present locally, and downloads are not allowed" "${CT_FORBID_DOWNLOAD}" = "y" - CT_DoLog EXTRA "Retrieving '${basename}'" CT_MktempDir tmp_dir