[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:12 UTC 2010


The following commit has been merged in the upstream branch:
commit 0e5d2647bd5f515dbaacf45f9e7dda5c27eb465a
Author: Markus Roberts <Markus at reality.com>
Date:   Mon Dec 21 23:55:39 2009 -0800

    Fix for #2940 (propogating nil rather than reporting the error)

diff --git a/lib/puppet/provider/package/sun.rb b/lib/puppet/provider/package/sun.rb
index f72738e..cd511b1 100755
--- a/lib/puppet/provider/package/sun.rb
+++ b/lib/puppet/provider/package/sun.rb
@@ -94,7 +94,7 @@ Puppet::Type.type(:package).provide :sun, :parent => Puppet::Provider::Package d
             execpipe(cmd) { |process|
                 # we're using the long listing, so each line is a separate
                 # piece of information
-                process.each { |line|
+                process.readlines.each { |line|
                     case line
                     when /^$/  # ignore
                     when /\s*([A-Z]+):\s+(.+)/
@@ -111,8 +111,9 @@ Puppet::Type.type(:package).provide :sun, :parent => Puppet::Provider::Package d
                 }
             }
             return hash
-        rescue Puppet::ExecutionFailure
-            return nil
+        rescue Puppet::ExecutionFailure => detail
+            puts detail.backtrace if Puppet[:trace]
+            raise Puppet::Error, "Unable to get information about package #{@resource[:name]} because of: #{detail}"
         end
     end
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list