Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove old java::* recipes, use java::multi with OpenJDK 6 being the …
…default (for now)
- Loading branch information
1 parent
13687ce
commit d571e7c
Showing
4 changed files
with
31 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,36 @@ | ||
version = 6 | ||
|
||
pkgs = value_for_platform( | ||
["centos","redhat","fedora","scientific","amazon"] => { | ||
"default" => ["java-1.#{version}.0-openjdk","java-1.#{version}.0-openjdk-devel"] | ||
}, | ||
["arch","freebsd"] => { | ||
"default" => ["openjdk#{version}"] | ||
}, | ||
"default" => ["openjdk-#{version}-jdk"] | ||
) | ||
pkgs = value_for_platform(["centos","redhat","fedora","scientific","amazon"] => { | ||
"default" => ["java-1.#{version}.0-openjdk","java-1.#{version}.0-openjdk-devel"] | ||
}, | ||
["arch","freebsd"] => { | ||
"default" => ["openjdk#{version}"] | ||
}, | ||
"default" => ["openjdk-#{version}-jdk"]) | ||
|
||
# once we test the waters and write the announcement, this will be moved to the | ||
# openjdk7 recipe. MK. | ||
execute "update-java-alternatives" do | ||
alternative = case [node[:platform], node[:platform_version]] | ||
when ["ubuntu", "11.04"] then | ||
"java-6-openjdk" | ||
when ["ubuntu", "11.10"] then | ||
"java-1.6.0-openjdk" | ||
when ["ubuntu", "12.04"] then | ||
"java-1.6.0-openjdk-i386" | ||
else | ||
"java-1.6.0-openjdk" | ||
end | ||
|
||
command "update-java-alternatives -s #{alternative}" | ||
returns [0,2] | ||
action :nothing | ||
only_if { platform?("ubuntu", "debian") } | ||
end | ||
|
||
pkgs.each do |pkg| | ||
package pkg do | ||
action :install | ||
notifies :run, resources(:execute => "update-java-alternatives") | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.