Apt does not. But yum does. Can't think of a clean solution though. I use tend to use dpkg_package while specifying source
On Jan 22, 2013 7:32 PM, "andi abes" <
">
> wrote:
>
> fair enough ... but AFAICT, apt doesn't really handle the "source" attribute, while dpkg does...
>
> I guess I care less of the exact implementation details, but the end result - if you use a source attribute, you probably don't want to use apt. So, to stay DRY, it'd be nice if the presence of "source" would trigger chef to use dpkg rather than apt.
>
>
> On Tue, Jan 22, 2013 at 10:26 PM, Dan Razzell <
">
> wrote:
>>
>> No, because, as with a number of packaging systems, the work is divided between a low-level tool (dpkg, rpm, ...) that operates locally and knows nothing about dependencies, and a high-level tool (apt-get, yum, ...) which searches remote repos and knows about dependency resolution.
>>
>>
>> On 13-01-22 06:59 PM, andi abes wrote:
>>>
>>> hmm.. seems that dpkg < apt, and that apt doesn't actually handle the source attribute, while dpkg does.
>>> Would it make sense to make dpkg the default package provider, but have it 'super' to apt if a source is not present?
>>>
>>>
>>>
>>> On Tue, Jan 22, 2013 at 9:25 PM, AJ Christensen <
">
> wrote:
>>>>
>>>> Jay,
>>>>
>>>> You can specify the 'provider' common attribute to any resource to control which provider the resource should use explicitly [0], e.g.;
>>>>
>>>> package "mypackage" do
>>>> source "/path/to/my/package.deb"
>>>> provider Chef::Provider::Package::Dpkg
>>>> end
>>>>
>>>> It is my understanding that there is no platform mapped for the package resource that would cause any platform nor family to use the Dpkg provider by default -- generally I'd use them with the dpkg_package shortcut resource.
>>>>
>>>> Cheers,
>>>>
>>>> AJ
>>>>
>>>> [0] http://docs.opscode.com/resource_common_attributes.html
>>>>
>>>>
>>>> On 23 January 2013 14:33, Jay Pipes <
">
> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I'm wondering why if I do this:
>>>>>
>>>>> package "mypackage" do
>>>>> source "/path/to/my/package.deb"
>>>>> end
>>>>>
>>>>> that the package resource cannot figure out to use the Dpkg provider to
>>>>> install the package?
>>>>>
>>>>> Instead, I get an error about no version specified and no candidate
>>>>> version available:
>>>>>
>>>>> http://paste.openstack.org/show/29738/
>>>>>
>>>>> If I change package to dpkg_package, it works correctly, but I was
>>>>> hoping the generic package resource would handle this based on the file
>>>>> extension...
>>>>>
>>>>> Best,
>>>>> -jay
>>>>
>>>>
>>>
>
Archive powered by MHonArc 2.6.16.