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

Luke Kanies luke at madstop.com
Tue Oct 27 17:06:02 UTC 2009


The following commit has been merged in the upstream branch:
commit 6ba122f62bf22c955a6923604a46a8ab22d8770b
Author: Luke Kanies <luke at madstop.com>
Date:   Sun Oct 18 17:06:28 2009 -0700

    Fixing #2735 - node classes are immed. added to classlist
    
    This commit adds any external node classes to the classlist
    at compiler initialization, so that at least those classes
    will be isolated from any ordering issues encountered when
    testing the contents of the class list during compilation.
    
    Signed-off-by: Luke Kanies <luke at madstop.com>

diff --git a/lib/puppet/parser/compiler.rb b/lib/puppet/parser/compiler.rb
index 521bf1c..77b0bb9 100644
--- a/lib/puppet/parser/compiler.rb
+++ b/lib/puppet/parser/compiler.rb
@@ -415,6 +415,9 @@ class Puppet::Parser::Compiler
 
         # local resource array to maintain resource ordering
         @resources = []
+
+        # Make sure any external node classes are in our class list
+        @catalog.add_class(*@node.classes)
     end
 
     # Set the node's parameters into the top-scope as variables.
diff --git a/spec/unit/parser/compiler.rb b/spec/unit/parser/compiler.rb
index 41f03f2..adc9732 100755
--- a/spec/unit/parser/compiler.rb
+++ b/spec/unit/parser/compiler.rb
@@ -86,6 +86,16 @@ describe Puppet::Parser::Compiler do
         it "should copy the parser version to the catalog" do
             @compiler.catalog.version.should == @parser.version
         end
+
+        it "should copy any node classes into the class list" do
+            node = Puppet::Node.new("mynode")
+            node.classes = %w{foo bar}
+            compiler = Puppet::Parser::Compiler.new(node, @parser)
+            p compiler.classlist
+
+            compiler.classlist.should include("foo")
+            compiler.classlist.should include("bar")
+        end
     end
 
     describe "when managing scopes" do

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list