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

Markus Roberts Markus at reality.com
Wed Jul 14 10:37:29 UTC 2010


The following commit has been merged in the upstream branch:
commit a2115afbe2a5ab83ea5c84896492eaaf62a33507
Author: Markus Roberts <Markus at reality.com>
Date:   Sat Jul 10 16:30:20 2010 -0700

    Alt fix for #4207 -- serialize environments as their names
    
    Environments contain a deal of transitory information and references to other
    objects, none of which is wanted when they are serialized.
    
    Rather than having this serialization concern propogate through the code by
    replacing environments by their names prior to serialization (which would be
    one way to address the problem) this patch changes environments so they only
    serialize their identity (name) and not their contents.

diff --git a/lib/puppet/node/environment.rb b/lib/puppet/node/environment.rb
index 44c7640..762599c 100644
--- a/lib/puppet/node/environment.rb
+++ b/lib/puppet/node/environment.rb
@@ -114,6 +114,13 @@ class Puppet::Node::Environment
     name.to_s
   end
 
+  # The only thing we care about when serializing an environment is its 
+  # identity; everything else is ephemeral and should not be stored or
+  # transmitted.
+  def to_zaml(z)
+    self.to_s.to_zaml(z)
+  end
+
   def validate_dirs(dirs)
     dirs.collect do |dir|
       if dir !~ /^#{File::SEPARATOR}/

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list