You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by co...@apache.org on 2014/12/01 21:54:03 UTC
bigtop git commit: BIGTOP-1395. Simplifying non-component versions
evaluation
Repository: bigtop
Updated Branches:
refs/heads/master 47ca4c64f -> 204f01bf1
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/204f01bf
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/204f01bf
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/204f01bf
Branch: refs/heads/master
Commit: 204f01bf11dc9da1eced998181163796926bdfe3
Parents: 47ca4c6
Author: Konstantin Boudnik <co...@apache.org>
Authored: Mon Dec 1 12:53:53 2014 -0800
Committer: Konstantin Boudnik <co...@apache.org>
Committed: Mon Dec 1 12:53:53 2014 -0800
----------------------------------------------------------------------
bigtop.mk | 2 --
packages.gradle | 29 +++++++++++------------------
2 files changed, 11 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/204f01bf/bigtop.mk
----------------------------------------------------------------------
diff --git a/bigtop.mk b/bigtop.mk
index b49d0e3..60bf9a1 100644
--- a/bigtop.mk
+++ b/bigtop.mk
@@ -18,8 +18,6 @@ BIGTOP_VERSION=0.9.0
# JDK Version
JDK_VERSION=1.7
JDK_BASE_VERSION=$(JDK_VERSION)
-$(eval BIGTOP_BOM += JDK_VERSION=$(JDK_VERSION))
-
# ZooKeeper
ZOOKEEPER_NAME=zookeeper
http://git-wip-us.apache.org/repos/asf/bigtop/blob/204f01bf/packages.gradle
----------------------------------------------------------------------
diff --git a/packages.gradle b/packages.gradle
index 92aa64b..e80cd0a 100644
--- a/packages.gradle
+++ b/packages.gradle
@@ -510,25 +510,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
}
@@ -544,8 +534,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]}"