Am 27.03.2010 09:04, schrieb Nigel Kersten:
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.

That's great for a bugfix, but I was trying to address a problem that both the original and your code exhibit. That might be worth another bug report + patch IFF my assumptions hold[1] and someone else agrees that this (having puppet not act on packages that should be :absent but are in half-something states) is a problem.



Best Regards, David

[1]I'm getting a bit rusty.

--
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.

Reply via email to