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

adding add-yum_repository-to-core.md #101

Closed
wants to merge 1 commit into from
Closed

adding add-yum_repository-to-core.md #101

wants to merge 1 commit into from

Conversation

someara
Copy link

@someara someara commented Mar 6, 2015

No description provided.

@lamont-granquist
Copy link
Contributor

Biggest concern that I've got is the windows_package core-chef vs. windows_package cookbook issue rearing its head again. Since you've got the same names, they'll collide, and you want to make sure that the cookbook either drops the resource entirely, or for back-compat it will only load the resource in the cookbook if the core chef resource does not exist. Someone who has upgraded their chef version but hasn't upgraded their cookbook version would still wind up with conflicts, but I think that's unavoidable.

@jtimberman
Copy link
Contributor

I'm 👍 on adding a yum repository provider to core Chef.

As an implementation example for comparison, see the homebrew cookbook 🍨.

@jonlives
Copy link
Contributor

👍

1 similar comment
@martinisoft
Copy link

👍

@danielsdeleo
Copy link
Contributor

👍 though I would prefer this be expanded to include apt as well. Seems like it would be super weird if you need the apt cookbook to install an apt repo but you get yum out of the box.

@thommay
Copy link
Collaborator

thommay commented Mar 12, 2015

👍 with the assumption that others will follow into core

@jonlives
Copy link
Contributor

Per @adamhjk's delegation of deciderating component-specific resources into core, I hereby approve this message.

@jonlives
Copy link
Contributor

Closing this off as resource submissions into core don't need an RFC - @someara, I shall await your PR with great interest :p

@miketheman
Copy link
Contributor

@someara some notes about testing for your future pr:

  • new resource is in core and current cookbooks use interfaces from the current cookbook?
  • new resource is in core, cookbook is in run list, what behavior is seen and used?

https://www.chef.io/blog/2015/02/10/chef-12-provider-resolver/ might be interesting

Basically, using a cookbook with the same resource name should override the code resource.

@jaym
Copy link
Contributor

jaym commented May 14, 2015

@someara some info about the windows cookbook:
The reason we were forced to create a library file for the windows_package resource/provider in the windows cookbook is because Chef 12 no longer overrides already defined constants. See chef/chef@02fb966?diff=split#diff-899b2263bd317e2bded0e852483b1a11R92

The way around this in Chef 12 is to use a name that does not conflict with a constant that would already be defined, in this case the conflicting names being Chef::Resource::WindowsPackage and Chef::Provider::WindowsPackage. After doing this, we can use the provides dsl method. Since we want to choose the name of the constants, we can not use the lwrp dsl.

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

Successfully merging this pull request may close these issues.

10 participants