- From: Jesse Nelson <
>
- To: Joseph Holsten <
>
- Cc: Jamie Winsor <
>, "
" <
>
- Subject: [chef-dev] Re: Re: Officially supported Opscode Homebrew provider
- Date: Thu, 5 Apr 2012 10:21:20 +0900
if node.platform == "mac_os_x"
case Chef::Platform.platforms[:mac_os_x][:default][:package]
when Chef::Provider::Package::Macports
when Chef::Provider::Package::Homebrew
....
end
end
should get you there
On Wed, Apr 4, 2012 at 11:51 PM, Joseph Holsten
<
>
wrote:
>
Great for internal and one-off recipes, but I'm talking about writing a
>
recipe that plays nice with both providers. For example, MacPorts and
>
homebrew have different names for equivalent MySQL packages.
>
>
I essentially want to write:
>
>
case node.platform
>
when /mac_os_x/
>
case node.provider[:package]
>
when :homebrew
>
...
>
when :macports
>
...
>
end
>
when ...
>
end
>
>
--
>
http://josephholsten.com
>
>
On Apr 4, 2012, at 14:27, Jesse Nelson
>
<
>
>
wrote:
>
>
> You can set the default provider you want by hand in a recipe early in
>
> the run list:
>
> Chef::Platform.platforms[:mac_os_x][:default][:package] =
>
> Chef::Provider::Package::Macports
>
>
>
> or use the resource directly:
>
> macports_package "foo"
>
>
>
>
>
> On Wed, Apr 4, 2012 at 4:53 PM, Joseph Holsten
>
> <
>
>
> wrote:
>
>> On a related note, is there a good way to branch on package provider? I'd
>
>> like to maintain MacPorts support, even if I'm the only one using it.
>
>>
>
>> --
>
>> http://josephholsten.com
>
>>
>
>> On Apr 3, 2012, at 5:59, Jamie Winsor
>
>> <
>
>
>> wrote:
>
>>
>
>> There was talk before Chef 0.10 about adding a Homebrew package provider
>
>> to
>
>> Chef - it can be found in this
>
>> ticket: http://tickets.opscode.com/browse/CHEF-1250
>
>>
>
>> It seems that the introduction of the chef-homebrew cookbook (found
>
>> here: https://github.com/mathie/chef-homebrew) was deemed the solution and
>
>> this ticket was marked 'fixed'.
>
>>
>
>> Homebrew has grown in popularity quite a bit. I'd like to open the
>
>> discussion back up again about potentially adding a Homebrew provider to
>
>> Chef core. This doesn't need to be the default provider for package on OSX
>
>> as CHEF-1250 suggests.
>
>>
>
>> Alternatively, if a Homebrew provider in Chef core isn't what the
>
>> community
>
>> wants, maybe we should have an officially supported Homebrew LWRP in
>
>> opscode-cookbooks. The chef-homebrew project on Github hasn't been updated
>
>> in quite some time and has a number of pristine pull requests waiting to
>
>> be
>
>> merged in. Some of them are pretty old, like this one from
>
>> Seth https://github.com/mathie/chef-homebrew/pull/2.
>
>>
>
>> I will perform the work either way we choose.
>
>>
>
>> Thoughts?
>
>>
>
>> --
>
>> Jamie Winsor
>
>> @resetexistence
>
>> https://github.com/reset
>
>>
Archive powered by MHonArc 2.6.16.