Alternatives improvements by ifel · Pull Request #259 · sous-chefs/java · GitHub
Skip to content

Alternatives improvements#259

Merged
erichelgeson merged 5 commits into
sous-chefs:masterfrom
ifel:alternatives
Jul 10, 2015
Merged

Alternatives improvements#259
erichelgeson merged 5 commits into
sous-chefs:masterfrom
ifel:alternatives

Conversation

@ifel

@ifel ifel commented Apr 3, 2015

Copy link
Copy Markdown
Contributor

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

samdunne commented Jul 8, 2015

Copy link
Copy Markdown

@samdunne

Copy link
Copy Markdown

Can confirm this works.

@erichelgeson

Copy link
Copy Markdown
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

lock Bot commented May 2, 2019

Copy link
Copy Markdown

@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