09:59 < BryanWB> btm, so is package ‘foo’ do arch ‘i386’; provider
Chef…Yum ; end the same as yum_package or different?
To answer your question regarding CHEF-2791 , and share it with the
mailing list, they’re different.
The way Chef works now, you have one common resource for all providers
for that resource.
So there is Chef::Resource::Package, and let’s say that creates the
representation of what we want to do. Then there is
Chef::Provider::Package and subclasses like
Chef::Provider::Apt which is what implements the resource on
This is why all providers have the same attributes, because they
actual package object, the package resource, is the same for all of
Except Chef::Resource::YumPackage, which is a unique resource
that adds additional attributes because Matthew Kent needed them. When
you use the “package” resource in a recipe, you get
Chef::Resource::Package and then if you specify the provider as an
attribute, or you are on a platform that defaults the package resource
to the yum provider, you get the top-level package resource.
But when you specify ““yum_package”” you are actually getting
It was originally build this way because logically you had one concept
of a package (the resource) that was abstract and then the providers
implemented that resource on each system. Which made sense.
As it’s grown, this has had some bumps and it’ll change down the road,
but we’re still designing that.