Permalink
Browse files

Fix tzdata/tzdata-java for java::openjdk6 on 64 bit Ubuntu 12.04

  • Loading branch information...
1 parent 54818b4 commit 65b0ecaaf04b1a60bc463077222a1e046391f333 @michaelklishin michaelklishin committed Aug 20, 2012
@@ -1,4 +1,14 @@
-node['java']['multi']['versions'].each do |java_version|
+include_recipe "timezone"
+
+case node.platform
+when "ubuntu", "debian"
+ bash "autoremove and autoclean packages" do
+ user "root"
+ code "apt-get -y autoclean autoremove && apt-get -f install"
+ end
+end
+
+node.java.multi.versions.each do |java_version|
Chef::Log.info("Installing Java #{java_version}.")
include_recipe "java::#{java_version}"
end
@@ -6,7 +6,19 @@
["arch","freebsd"] => {
"default" => ["openjdk#{version}"]
},
- "default" => ["openjdk-#{version}-jdk"])
+ "default" => ["tzdata-java",
+ "openjdk-#{version}-jre-headless",
+ "openjdk-#{version}-jdk"])
+
+case node.platform
+when "ubuntu", "debian"
+ if node.platform_version.to_f >= 12.04
+ package "tzdata" do
+ version "2012b-1"
+ options "--force-yes"
+ end
+ end
+end
pkgs.each do |pkg|
package pkg do
@@ -8,10 +8,18 @@
#
-if ['debian','ubuntu'].member? node[:platform]
+case node.platform
+when ['debian','ubuntu']
# Make sure it's installed. It would be a pretty broken system
# that didn't have it.
- package "tzdata"
+ if node.platform_version.to_f >= 12.04
+ package "tzdata" do
+ version "2012b-1"
+ options "--force-yes"
+ end
+ else
+ package "tzdata"
+ end
template "/etc/timezone" do
source "timezone.conf.erb"

0 comments on commit 65b0eca

Please sign in to comment.