Repository: bigtop Updated Branches: refs/heads/master 95dbb0134 -> 7ca693cd2
BIGTOP-1395. Simplifying non-component versions evaluation. Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/7ca693cd Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/7ca693cd Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/7ca693cd Branch: refs/heads/master Commit: 7ca693cd2faecc33bd15116643b289233795792c Parents: 95dbb01 Author: Konstantin Boudnik <[email protected]> Authored: Fri Aug 8 11:41:06 2014 -0700 Committer: Konstantin Boudnik <[email protected]> Committed: Sat Aug 9 21:30:28 2014 -0700 ---------------------------------------------------------------------- bigtop.mk | 2 -- packages.gradle | 29 +++++++++++------------------ 2 files changed, 11 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/7ca693cd/bigtop.mk ---------------------------------------------------------------------- diff --git a/bigtop.mk b/bigtop.mk index 7123f5a..bd5b84a 100644 --- a/bigtop.mk +++ b/bigtop.mk @@ -18,8 +18,6 @@ BIGTOP_VERSION=0.8.0 # JDK Version JDK_VERSION=1.7 JDK_BASE_VERSION=$(JDK_VERSION) -$(eval BIGTOP_BOM += JDK_VERSION=$(JDK_VERSION)) - # Hadoop 0.20.0-based hadoop package HADOOP_NAME=hadoop http://git-wip-us.apache.org/repos/asf/bigtop/blob/7ca693cd/packages.gradle ---------------------------------------------------------------------- diff --git a/packages.gradle b/packages.gradle index 16c1e19..33facd0 100644 --- a/packages.gradle +++ b/packages.gradle @@ -467,25 +467,15 @@ def readBOM = { bomfile.eachLine { if (!it.startsWith("#") && !it.isEmpty()) { if (it.startsWith("\$(eval")) { - // should either match $(eval $(call PACKAGE,xxxx,XXXX)) def pattern = ~/.*call PACKAGE,(\w+[-\w+]*),(\w+)/ def m = it =~ pattern - def variable = "" - if (m.size() == 1) { - def target = m[0][1] - variable = m[0][2] - genTasks(target, variable) - targets.add(target) - } else { - // or match $(eval BIGTOP_BOM += XXXX_VERSION=$(XXXX_VERSION)) - pattern = ~/.*BIGTOP_BOM \+= (\w+)_VERSION=\$\((\w+)_VERSION\)\).*/ - m = it =~ pattern - print m.size() - assert(m.size() == 1) - assert( m[0][1]== m[0][2]) - variable = m[0][1] - } + assert m.size() == 1 + def target = m[0][1] + def variable = m[0][2] + genTasks(target, variable) + targets.add(target) // Store the component name in the list + // TODO - we might not need them components anymore: version are calculated differently now components.add(variable) return } @@ -501,8 +491,11 @@ def readBOM = { project.afterEvaluate { readBOM() def bomVersions = "" - components.each { component -> - bomVersions += "${component + '_VERSION'}=${BOM_map[component + '_BASE_VERSION']} " + // Versions need to be preserved for more than just component: + // - there are JDK version requirement + // - possibly more in the future + BOM_map.keySet().findAll { it ==~ /.*_BASE_VERSION/ }.each { base_version -> + bomVersions += "${base_version.replaceAll('_BASE', '')}=${BOM_map[base_version]} " } BOM_map[BIGTOP_BOM] = bomVersions if (System.getProperty(VERBOSE))println "BIGTOP_BOM:\n${BOM_map[BIGTOP_BOM]}"
