IMPALA-3211: provide toolchain build id for bootstrapping

Testing:
Ran a private build, which succeeded.

Change-Id: Ibcc25ae82511713d0ff05ded37ef162925f2f0fb
Reviewed-on: http://gerrit.cloudera.org:8080/4771
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/aa7741a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/aa7741a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/aa7741a5

Branch: refs/heads/master
Commit: aa7741a57bbd3c11377e29c59e1d734bcdebf602
Parents: a625701
Author: Tim Armstrong <[email protected]>
Authored: Wed Oct 19 15:44:59 2016 -0700
Committer: Internal Jenkins <[email protected]>
Committed: Tue Oct 25 05:10:28 2016 +0000

----------------------------------------------------------------------
 bin/bootstrap_toolchain.py | 9 +++++++--
 bin/impala-config.sh       | 7 +++++++
 2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/aa7741a5/bin/bootstrap_toolchain.py
----------------------------------------------------------------------
diff --git a/bin/bootstrap_toolchain.py b/bin/bootstrap_toolchain.py
index 3f161c8..dbe53a2 100755
--- a/bin/bootstrap_toolchain.py
+++ b/bin/bootstrap_toolchain.py
@@ -86,9 +86,14 @@ def wget_and_unpack_package(download_path, file_name, 
destination, wget_no_clobb
 def download_package(destination, product, version, compiler, 
platform_release=None):
   remove_existing_package(destination, product, version)
 
+  toolchain_build_id = os.environ["IMPALA_TOOLCHAIN_BUILD_ID"]
   label = get_platform_release_label(release=platform_release)
-  file_name = "{0}-{1}-{2}-{3}.tar.gz".format(product, version, compiler, 
label)
-  url_path="/{0}/{1}-{2}/{0}-{1}-{2}-{3}.tar.gz".format(product, version, 
compiler, label)
+  format_params = {'product': product, 'version': version, 'compiler': 
compiler,
+      'label': label, 'toolchain_build_id': toolchain_build_id}
+  file_name = 
"{product}-{version}-{compiler}-{label}.tar.gz".format(**format_params)
+  format_params['file_name'] = file_name
+  url_path = 
"/{toolchain_build_id}/{product}/{version}-{compiler}/{file_name}".format(
+      **format_params)
   download_path = HOST + url_path
 
   wget_and_unpack_package(download_path, file_name, destination, True)

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/aa7741a5/bin/impala-config.sh
----------------------------------------------------------------------
diff --git a/bin/impala-config.sh b/bin/impala-config.sh
index 85bcbfc..4e848c1 100755
--- a/bin/impala-config.sh
+++ b/bin/impala-config.sh
@@ -52,6 +52,12 @@ fi
 # If true, will not call $IMPALA_HOME/bin/bootstrap_toolchain.py.
 : ${SKIP_TOOLCHAIN_BOOTSTRAP=false}
 
+# The unique build id of the toolchain to use if bootstrapping. This is 
generated by the
+# native-toolchain build when publishing its build artifacts. This should be 
changed when
+# moving to a different build of the toolchain, e.g. when a version is bumped 
or a
+# compile option is changed.
+: ${IMPALA_TOOLCHAIN_BUILD_ID=249-2267164200}
+
 # This flag is used in $IMPALA_HOME/cmake_modules/toolchain.cmake.
 # If it's 0, Impala will be built with the compiler in the toolchain directory.
 : ${USE_SYSTEM_GCC=0}
@@ -79,6 +85,7 @@ fi
 
 export IMPALA_TOOLCHAIN
 export SKIP_TOOLCHAIN_BOOTSTRAP
+export IMPALA_TOOLCHAIN_BUILD_ID
 export USE_SYSTEM_GCC
 export USE_GOLD_LINKER
 export IMPALA_CXX_COMPILER

Reply via email to