[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

Jesse Wolfe jes5199 at gmail.com
Wed Jul 14 10:37:28 UTC 2010


The following commit has been merged in the upstream branch:
commit fe4dcd8b5985084462f1ee6e5e9887a8975bf18e
Author: Jesse Wolfe <jes5199 at gmail.com>
Date:   Sat Jul 10 22:16:18 2010 -0700

    [#4208] Missing parameter breaks multithread compilation
    
    import_if_possible calls itself recursively, but it was failing to pass
    its block parameter to its younger self. Thus when the inner call
    reached the un-blocked case, it raised an exception rather than doing
    something useful.

diff --git a/lib/puppet/parser/type_loader.rb b/lib/puppet/parser/type_loader.rb
index e56ab94..6c32f6a 100644
--- a/lib/puppet/parser/type_loader.rb
+++ b/lib/puppet/parser/type_loader.rb
@@ -126,16 +126,16 @@ class Puppet::Parser::TypeLoader
 
   # Utility method factored out of load for handling thread-safety.
   # This isn't tested in the specs, because that's basically impossible.
-  def import_if_possible(file)
+  def import_if_possible(file, &blk)
     return if @loaded.include?(file)
     begin
       case @loading.owner_of(file)
       when :this_thread
         return
       when :another_thread
-        return import_if_possible(file)
+        return import_if_possible(file, &blk)
       when :nobody
-        yield
+        blk.call
       end
     rescue Puppet::ImportError => detail
       # We couldn't load the item

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list