Repository: bigtop
Updated Branches:
  refs/heads/master a86f588ce -> 6f7e97e93


BIGTOP-2832. Toolchain failed to install on Debian 8


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/6f7e97e9
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/6f7e97e9
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/6f7e97e9

Branch: refs/heads/master
Commit: 6f7e97e93393d7c078d8928cc666b2bb03147f32
Parents: 8054d01
Author: Evans Ye <[email protected]>
Authored: Wed Jul 5 14:42:54 2017 +0800
Committer: Evans Ye <[email protected]>
Committed: Thu Jul 6 23:21:23 2017 +0800

----------------------------------------------------------------------
 bigtop_toolchain/manifests/jdk.pp      | 17 ++++++++++++++++-
 bigtop_toolchain/manifests/packages.pp |  2 +-
 2 files changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/6f7e97e9/bigtop_toolchain/manifests/jdk.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/jdk.pp 
b/bigtop_toolchain/manifests/jdk.pp
index 8c1518b..4e15eb1 100644
--- a/bigtop_toolchain/manifests/jdk.pp
+++ b/bigtop_toolchain/manifests/jdk.pp
@@ -17,8 +17,23 @@ class bigtop_toolchain::jdk {
   case $::operatingsystem {
     /Debian/: {
       require apt
-      unless $os[release][major] > "8" {
+      unless $operatingsystemmajrelease > "8" {
+         # we pin openjdk-8-* and ca-certificates-java to backports
          require apt::backports
+
+         apt::pin { 'backports_jdk':
+            packages => 'openjdk-8-*',
+            priority => 500,
+            release  => 'jessie-backports',
+         } ->
+         apt::pin { 'backports_ca':
+            packages => 'ca-certificates-java',
+            priority => 500,
+            release  => 'jessie-backports',
+         } ->
+         exec {'own_update':
+            command => '/usr/bin/apt-get update'
+         } -> Package['openjdk-8-jdk']
       }
 
       package { 'openjdk-8-jdk' :

http://git-wip-us.apache.org/repos/asf/bigtop/blob/6f7e97e9/bigtop_toolchain/manifests/packages.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/packages.pp 
b/bigtop_toolchain/manifests/packages.pp
index 6101e35..7a15d3b 100644
--- a/bigtop_toolchain/manifests/packages.pp
+++ b/bigtop_toolchain/manifests/packages.pp
@@ -159,7 +159,7 @@ class bigtop_toolchain::packages {
     ] }
     /(Ubuntu|Debian)/: {
       # Debian-9 is using mariadb instead of mysql
-      if ($operatingsystem == "Debian") and ($os[release][major] > "8") {
+      if ($operatingsystem == "Debian") and ($operatingsystemmajrelease > "8") 
{
         $mysql_dev="libmariadb-dev"
       } else {
         $mysql_dev="libmysqlclient-dev"

Reply via email to