On Sat, Mar 27, 2010 at 12:56 AM, David Schmitt <[email protected]> wrote:
> Am 26.03.2010 23:10, schrieb Nigel Kersten:
>>
>> @@ -47,9 +49,12 @@ Puppet::Type.type(:package).provide :dpkg, :parent =>
>>  Puppet::Provider::Package
>>
>>              if hash[:status] == 'not-installed'
>>                  hash[:ensure] = :purged
>> -            elsif hash[:status] != "installed"
>> +            elsif ['config-files', 'half-installed', 'unpacked',
>> 'half-configured'].include?(hash[:status])
>>                  hash[:ensure] = :absent
>>              end
>> +            if hash[:desired] == 'hold'
>> +                hash[:ensure] = :held
>> +            end
>
> I've never spent any thought on this, but reading this chunk, the question
> arose whether this is the right policy? Arguably, packages which are
> 'half-installed', 'unpacked', or 'half-configured' would still need some
> action to actually make them :absent, no?

I had the same concern, but this is actually the same functionality as
before. Essentially all I've done is add a case for hold, explicitly
listed valid statuses, and now raise an error for an unknown status.

The actual functionality of all states other than 'hold' should be
exactly the same as before, except unknown states will error.

>
>
> Best Regards, David
> --
> dasz.at OG              Tel: +43 (0)664 2602670     Web: http://dasz.at
> Klosterneuburg                                         UID: ATU64260999
>
>       FB-Nr.: FN 309285 g          FB-Gericht: LG Korneuburg
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/puppet-dev?hl=en.
>
>



-- 
nigel

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to