[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1601-gf8c1b08

James Turnbull james at lovedthanlost.net
Fri Jan 15 09:08:40 UTC 2010


The following commit has been merged in the upstream branch:
commit e7d98ccbc0021bace65dd8525e730462947e5049
Author: Markus Roberts <Markus at reality.com>
Date:   Sat Jan 2 10:09:51 2010 -0800

    Fix for #2999 (absent package handling on solaris)
    
    The fix for #2940 resulted in a behavior change that could be seen as a
    bug.  This was consistent with many of the other providers (see #3000)
    but was not the desired behavior.
    
    This patch enhances the patch for #2940 to return {:ensure => :absent} as
    the present state in the case that the failure was due to the package not
    being installed (as opposed to a source/index failure, etc.).  The other
    possibility would have been {:ensure => :purged}.

diff --git a/lib/puppet/provider/package/sun.rb b/lib/puppet/provider/package/sun.rb
index cd511b1..4f8b311 100755
--- a/lib/puppet/provider/package/sun.rb
+++ b/lib/puppet/provider/package/sun.rb
@@ -112,6 +112,7 @@ Puppet::Type.type(:package).provide :sun, :parent => Puppet::Provider::Package d
             }
             return hash
         rescue Puppet::ExecutionFailure => detail
+            return {:ensure => :absent} if detail.message =~ /information for "#{Regexp.escape(@resource[:name])}" was not found/
             puts detail.backtrace if Puppet[:trace]
             raise Puppet::Error, "Unable to get information about package #{@resource[:name]} because of: #{detail}"
         end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list