Allow switching between custom and bootstrapped toolchain If SKIP_TOOLCHAIN_BOOTSTRAP is set, toolchain bootstrap is skipped. This means that even if you are running on a supported OS, your custom-built toolchain artifacts will always be used.
Also use Ubuntu 14.04 toolchain artifacts for Ubuntu 15.10. I have been using the artifacts locally for a while and it has been working fine. Change-Id: If3bae187cc8a829c693711482c0ec656e41b7bf2 Reviewed-on: http://gerrit.cloudera.org:8080/2665 Reviewed-by: Tim Armstrong <[email protected]> Tested-by: Internal Jenkins Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/40117bf7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/40117bf7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/40117bf7 Branch: refs/heads/master Commit: 40117bf7258f00d156b5a458c6949041aa076118 Parents: 3d5a21c Author: Tim Armstrong <[email protected]> Authored: Wed Mar 30 09:03:56 2016 -0700 Committer: Internal Jenkins <[email protected]> Committed: Thu Mar 31 22:01:01 2016 +0000 ---------------------------------------------------------------------- CMakeLists.txt | 20 ++++++++++++-------- bin/bootstrap_toolchain.py | 3 ++- 2 files changed, 14 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/40117bf7/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/CMakeLists.txt b/CMakeLists.txt index f1a8e01..595b082 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,15 +18,19 @@ if (NOT $ENV{DISABLE_IMPALA_TOOLCHAIN}) # Enable toolchain variable if the environment is setup set(IMPALA_TOOLCHAIN ON) message(STATUS "Toolchain build.") - # Download any missing toolchain dependencies. If this fails, fail the build. - set(BOOTSTRAP_CMD "$ENV{IMPALA_HOME}/bin/bootstrap_toolchain.py") - # Download and unpack the dependencies - message(STATUS "Downloading and extracting dependencies.") - execute_process(COMMAND ${BOOTSTRAP_CMD} RESULT_VARIABLE BOOTSTRAP_RESULT) - if (${BOOTSTRAP_RESULT} EQUAL 0) - message(STATUS "Toolchain bootstrap complete.") + if ("$ENV{SKIP_TOOLCHAIN_BOOTSTRAP}" STREQUAL "true") + message(STATUS "SKIP_TOOLCHAIN_BOOTSTRAP is true, skipping toolchain bootstrap.") else() - message(FATAL_ERROR "Toolchain bootstrap failed.") + # Download any missing toolchain dependencies. If this fails, fail the build. + set(BOOTSTRAP_CMD "$ENV{IMPALA_HOME}/bin/bootstrap_toolchain.py") + # Download and unpack the dependencies + message(STATUS "Downloading and extracting dependencies.") + execute_process(COMMAND ${BOOTSTRAP_CMD} RESULT_VARIABLE BOOTSTRAP_RESULT) + if (${BOOTSTRAP_RESULT} EQUAL 0) + message(STATUS "Toolchain bootstrap complete.") + else() + message(FATAL_ERROR "Toolchain bootstrap failed.") + endif() endif() else() set(IMPALA_TOOLCHAIN OFF) http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/40117bf7/bin/bootstrap_toolchain.py ---------------------------------------------------------------------- diff --git a/bin/bootstrap_toolchain.py b/bin/bootstrap_toolchain.py index e12eef4..16f2e1b 100755 --- a/bin/bootstrap_toolchain.py +++ b/bin/bootstrap_toolchain.py @@ -46,7 +46,8 @@ OS_MAPPING = { "suselinux12": "ec2-package-sles-12", "ubuntu12.04" : "ec2-package-ubuntu-12-04", "ubuntu14.04" : "ec2-package-ubuntu-14-04", - "ubuntu15.04" : "ec2-package-ubuntu-14-04" + "ubuntu15.04" : "ec2-package-ubuntu-14-04", + "ubuntu15.10" : "ec2-package-ubuntu-14-04", } def try_get_release_label():
