Skip to content
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

Alternatives improvements #259

Merged
merged 5 commits into from
Jul 10, 2015
Merged

Conversation

ifel
Copy link
Contributor

@ifel ifel commented Apr 3, 2015

When one uses java_ark provider in own cookbook to install several javas on a machine, there are 2 issues:

  1. The provider removes alternatives configuration before installing alternative for bin cmd. So, if one has another java installed manually, or install several ones using own cookbook, only latest appear in alternatives. Another one issue here is, the latest installed one becomes active in spite of priority and while installation is in progress, the one is being installed is active.
  2. [COOK-1114] Fixed "no method exists? for the Chef::Resource::File class" error in the "openjdk" recipe #1 can be mitigated by setting default attribute to false. However, if value of 'default' attribute for a resource is false, it forces adding '_alt' suffix for directory name and this cannot be controlled. Therefore, if one decides to switch java installation from one to another, it will install two javas again. So it's nice to have a switch to control this behavior.
  3. If priority of alternative gets changed, and the provider installs already existing alternative (but with another prio), the alternative switches to manual mode if it was auto.

This change corrects all these issues. But all defaults are set that way, so original behavior remains.

@samdunne
Copy link

samdunne commented Jul 8, 2015

👍

@samdunne
Copy link

Can confirm this works.

@erichelgeson
Copy link
Contributor

Thanks for testing. I dont usually use alternatives (just set JAVA_HOME where needed)

erichelgeson added a commit that referenced this pull request Jul 10, 2015
@erichelgeson erichelgeson merged commit b931513 into sous-chefs:master Jul 10, 2015
@lock
Copy link

lock bot commented May 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants