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

Several sets of changes #26

Merged
merged 4 commits into from
Jun 19, 2011
Merged

Several sets of changes #26

merged 4 commits into from
Jun 19, 2011

Conversation

temujin9
Copy link
Contributor

First commit fixes a bug with rvm::system and mysql::client (which runs gem_package at compile time).

Second commit is a workaround for an internal bug resulting in GID collision between recipes. It's less likely to be generally useful, but probably still worth including.

Third commit fixes an (intermittent?) bug found in first commit.

Fourth commit uses gem_package's native code if ruby_string == 'system', which will be a bit more useful once rvm::gem_package can use multiple environments.

@fnichol
Copy link
Contributor

fnichol commented Jun 18, 2011

These are great adds and fixes, thanks! There's only one thing I had a question about. I was looking at pushing the rvm gem install into the execute phase to be more in line with the other opscode cookbooks. It looks like most are being updated to clear out these kinds of problems (chef-boneyard/cookbooks@9597eb7). But you're right that if there are cookbooks running gem_package in the compilation phase then we don't have an RVM environment setup yet.
Other than the mysql cookbook (which looks updated now currently), can you think of other cookbooks with this kind of problem? I'm hoping I can get a few comments back (https://twitter.com/#!/fnichol/status/82127542496149504).
Otherwise, the other commits look ripe for pulling in.

@temujin9
Copy link
Contributor Author

I can see legitimate need for other cookbooks to put gem_package calls in the compile phase, but MySQL's the only cookbook that we encountered this problem with so far.

@fnichol fnichol merged commit 17662f2 into sous-chefs:master Jun 19, 2011
@fnichol
Copy link
Contributor

fnichol commented Jun 19, 2011

Pulled in and updated a couple of things. Mainly:

  • We only need to install RVM in the compilation phase if recipe[rvm::gem_package] is included in the run_list. So default behavior can stay the same, but will be altered on inclusion of the gem_package recipe.
  • The default RVM ruby and list of rubies don't need to be installed in the compilation phase. The RVMRubygems package provider calls the rvm_environment resource just before installing the gem, so whatever RVM ruby/gemset will get "lazily" created on demand at that point.
  • Adding support for multiple rubies in gem_packge's rvm_string parameter meant some adjustments to the fourth commit, but I believe the desired behavior remains.

Thanks again for your help, I think we have a more robust gem_package solution as a result.

@temujin9
Copy link
Contributor Author

My pleasure. Some more bug-fixes on this coming shortly.

@lock
Copy link

lock bot commented Apr 25, 2020

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 Apr 25, 2020
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.

2 participants