[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 2.6.5rc1-120-g2247c80

Markus Roberts Markus at reality.com
Mon Feb 7 06:43:06 UTC 2011


The following commit has been merged in the upstream branch:
commit ac8d316a08cffd951a883936a9966388ca3e54ee
Author: Markus Roberts <Markus at reality.com>
Date:   Wed Feb 2 14:12:45 2011 -0800

    Fix for #5755 -- making zaml serialization robust over projected objects
    
    The core problem arose when the fix for #5048 in 31118fe85aca4 introduced a
    hook to replace objects dynamically durring serialization so that they could be
    projected / rewritten to a different form for backward compatability.  The
    serialization code assumed that all objects being serialized would remain valid
    until the serialization was complete, but nothing retained a copy of the
    temporary objects created in the hook.
    
    To resolve this, the serialization layer now maintains a ref to each such object
    and clears them (to allow GC) after serialization is complete.
    
    Paired-with: Jesse Wolfe <jesse at puppetlabs.com>
    Paired-with: Paul Berry <paul at puppetlabs.com>

diff --git a/lib/puppet/util/zaml.rb b/lib/puppet/util/zaml.rb
index 14aa90e..b22dfc1 100644
--- a/lib/puppet/util/zaml.rb
+++ b/lib/puppet/util/zaml.rb
@@ -20,6 +20,7 @@ class ZAML
   def self.dump(stuff, where='')
     z = new
     stuff.to_zaml(z)
+    Label.counter_reset
     where << z.to_s
   end
   #
@@ -61,6 +62,7 @@ class ZAML
     end
     def initialize(obj)
       @this_label_number = nil
+      @obj = obj # prevent garbage collection so that object id isn't reused
       @@previously_emitted_object[obj.object_id] = self
     end
     def to_s

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list