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 Provider Limitation #277

Closed
davedcusack opened this issue Jul 8, 2015 · 3 comments
Closed

Alternatives Provider Limitation #277

davedcusack opened this issue Jul 8, 2015 · 3 comments

Comments

@davedcusack
Copy link

Context: I'm trying to using the cookbook to install multiple versions of java on the same machine and then manage these versions using alternatives. From the investigation i've done I dont think this is possible with the current implementation.

So from the alternatives documentation http://linux.about.com/library/cmd/blcmdl8_alternatives.htm

--install link name path

link is the name of its symlink
name is the generic name for the master link
path is the alternative being introduced for the master link

--display name
Display information about the link group of which name is the master link. Information displayed includes the group's mode (auto or manual), which alternative the symlink currently points to, what other alternatives are available (and their corresponding slave alternatives), and the highest priority alternative currently installed.

So after i've installed two versions of java when I run "alternatives --display java" I should see two options
displayed. However I only see one option the master link.

After a little investigation I found this line in the provider https://github.com/agileorbit-cookbooks/java/blob/master/providers/alternatives.rb#L41 "shell_out("rm /var/lib/alternatives/#{cmd}")" which is run before each install. This wipes out all java alternative information meaning the last version installed will be the only one configured correctly.

This line was introduced to fix this issue https://github.com/agileorbit-cookbooks/java/issues/134 I'm not sure that its the best solution to the issue because it renders alternatives pretty much useless.

If i'm missing something i'm all ears!

Edit: Looks like this pull request addresses the issues i'm seeing https://github.com/agileorbit-cookbooks/java/pull/259 are there plans to merge and release this?

@samdunne
Copy link

Can someone look at either this issue or #259 ?

@damacus
Copy link
Member

damacus commented Jun 9, 2018

Closing due to inactivity.

If this is still an issue please reopen or open another issue. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help!

Thanks,
Sous-Chefs

@damacus damacus closed this as completed Jun 9, 2018
@lock
Copy link

lock bot commented Jun 9, 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 Jun 9, 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

No branches or pull requests

3 participants