New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support to determine whether to set installed java version to defa... #140

Merged
merged 3 commits into from Feb 24, 2014

Conversation

Projects
None yet
2 participants
@cantenesse
Contributor

cantenesse commented Feb 20, 2014

...ult

@cantenesse

This comment has been minimized.

Contributor

cantenesse commented Feb 20, 2014

I created an attribute, node['java']['set_default'](true by default), that is a parameter for the 'alternatives' provider. This was done for the recipes ibm, ibm_tar and openjdk. The recipes oracle and oracle_i386 call the provider java_ark. I pass 'default' to java_ark with the value of 'node['java']['set_default'].

The oracle_rpm recipe does not call either provider (alternatives or ark). My changes from before persist. Please let me know if I'm missing something, but I don't see a better way to handle this for the oracle_rpm recipe.

@@ -28,6 +28,7 @@
java_home = node['java']["java_home"]
arch = node['java']['arch']
set_default = node['java']['set_default']

This comment has been minimized.

@carmstrong

carmstrong Feb 22, 2014

Contributor

This can probably just be in-line below - no use creating a temporary variable for it.

@@ -27,6 +27,7 @@
end
java_home = node['java']["java_home"]
set_default = node['java']['set_default']

This comment has been minimized.

@carmstrong

carmstrong Feb 22, 2014

Contributor

This can probably just be in-line below - no use creating a temporary variable for it.

@@ -49,6 +49,7 @@
when 'oracle_rpm'
default['java']['oracle_rpm']['type'] = 'jdk'
default['java']['java_home'] = "/usr/java/latest"
default['java']['set_default'] = true

This comment has been minimized.

@carmstrong

carmstrong Feb 22, 2014

Contributor

This should be moved outside the case statement.

@cantenesse

This comment has been minimized.

Contributor

cantenesse commented Feb 22, 2014

Recommended changes pushed. Thanks!

@@ -47,7 +47,8 @@
end
java_ark "jdk-alt" do
url tarball_url
url node['java']['set_default']

This comment has been minimized.

@carmstrong

carmstrong Feb 23, 2014

Contributor

Looks like an accidental mistake here.

@cantenesse

This comment has been minimized.

Contributor

cantenesse commented Feb 24, 2014

Fixed, sorry about that.

carmstrong added a commit that referenced this pull request Feb 24, 2014

Merge pull request #140 from cantenesse/control_default
added support to determine whether to set installed java version to defa...

@carmstrong carmstrong merged commit 3258352 into sous-chefs:master Feb 24, 2014

@carmstrong

This comment has been minimized.

Contributor

carmstrong commented Feb 24, 2014

👍

@carmstrong

This comment has been minimized.

Contributor

carmstrong commented Feb 26, 2014

@cantenesse could you also update README.md to reference the newly-created attribute?

@cantenesse

This comment has been minimized.

Contributor

cantenesse commented Feb 26, 2014

Will do.
On Feb 25, 2014 7:18 PM, "Christopher Armstrong" notifications@github.com
wrote:

@cantenesse https://github.com/cantenesse could you also update
README.md to reference the newly-created attribute?

Reply to this email directly or view it on GitHubhttps://github.com//pull/140#issuecomment-36086850
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment