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

Markus Roberts Markus at reality.com
Fri Jan 15 09:08:27 UTC 2010


The following commit has been merged in the upstream branch:
commit d1ff4b3fca31ee99276c26bc1df6391cfc79254a
Author: Markus Roberts <Markus at reality.com>
Date:   Tue Dec 29 11:14:44 2009 -0800

    Fix for #2994 (undefined method "_file" message)
    
    Attempting to call a constructed method name with a nil component
    (the checksum type in this case) causes an unhelpful error message
    in a case where either 1) the results were not needed anyway or 2)
    a more useful error message would otherwise be generated. It also
    opens (at least hypothetically) then possibility that some unrelated
    method (in this case "_file" would be called if it existed.

diff --git a/lib/puppet/type/file/content.rb b/lib/puppet/type/file/content.rb
index 36e6c41..032c7c8 100755
--- a/lib/puppet/type/file/content.rb
+++ b/lib/puppet/type/file/content.rb
@@ -116,7 +116,7 @@ module Puppet
             return :absent unless stat = @resource.stat
             ftype = stat.ftype
             # Don't even try to manage the content on directories or links
-            return nil if ["directory","link"].include? ftype
+            return nil if ["directory","link"].include? ftype or checksum_type.nil?
 
             begin
                 "{#{checksum_type}}" + send(checksum_type.to_s + "_file", resource[:path]).to_s

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list