Package: puppet-common Version: 2.6.2-5+squeeze6 Hello,
We seem to occasionally bump into puppet bug #5298 with some of our defined resources. The bug is fixed on puppet 2.6.3. We tried to apply it against 2.6.2-5+squeeze6 and it applies successfully. It is in production, serving almost 300 Debian Squeeze clients for about a month now without causing any problems so far. It would be nice to see it merged in a future Debian point release, if it meets your standards. You will find the patch, as was recorded with quilt, attached. This patch was tested on a clean Debian amd64 6.0.6 Squeeze box (no backports or third party repositories), used as the puppetmaster. Thanks in advance, Costas Drogos
Index: puppet-2.6.2/lib/puppet/parser/ast/collection.rb =================================================================== --- puppet-2.6.2.orig/lib/puppet/parser/ast/collection.rb 2012-10-09 18:59:01.000000000 +0300 +++ puppet-2.6.2/lib/puppet/parser/ast/collection.rb 2012-10-09 18:59:51.000000000 +0300 @@ -19,7 +19,8 @@ str = code = nil end - newcoll = Puppet::Parser::Collector.new(scope, @type, str, code, self.form) + resource_type = scope.find_resource_type(@type) + newcoll = Puppet::Parser::Collector.new(scope, resource_type.name, str, code, self.form) scope.compiler.add_collection(newcoll) Index: puppet-2.6.2/spec/unit/parser/ast/collection_spec.rb =================================================================== --- puppet-2.6.2.orig/spec/unit/parser/ast/collection_spec.rb 2012-10-09 18:59:09.000000000 +0300 +++ puppet-2.6.2/spec/unit/parser/ast/collection_spec.rb 2012-10-09 19:01:22.000000000 +0300 @@ -5,6 +5,8 @@ describe Puppet::Parser::AST::Collection do before :each do @scope = stub_everything 'scope' + @mytype = stub_everything('mytype') + @scope.stubs(:find_resource_type).returns @mytype @compiler = stub_everything 'compile' @scope.stubs(:compiler).returns(@compiler) @@ -24,6 +26,8 @@ it "should instantiate a Collector for this type" do collection = Puppet::Parser::AST::Collection.new :form => :virtual, :type => "test" + @test_type = stub 'type', :name => 'test' + @scope.expects(:find_resource_type).with('test').returns @test_type Puppet::Parser::Collector.expects(:new).with(@scope, "test", nil, nil, :virtual)