[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.6-1-356-g5718585

James Turnbull james at lovedthanlost.net
Fri Jan 23 14:20:59 UTC 2009


The following commit has been merged in the master branch:
commit 98e79f8b7dbbdcb29c91b6099569e180bd8267c7
Author: Luke Kanies <luke at madstop.com>
Date:   Wed Sep 24 17:46:57 2008 -0500

    Fixed #1472 -- defined, exported resources in the current compile now get expanded
    correctly.
    
    This was working for defined resources in the db, but not in the current compile.
    I just had to mark the resources as non-exported.

diff --git a/CHANGELOG b/CHANGELOG
index 94d0581..01ee181 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,8 @@
 0.24.x
     Fixed #1045 - Multiple metaparams all get added to resources.
+    
+    Fixed #1472 -- defined, exported resources in the current compile now get expanded
+    correctly.
 
     Fixed #1595 - Internally, Property#retrieve is no longer called
     when no 'should' value is available for a resource.
diff --git a/lib/puppet/parser/collector.rb b/lib/puppet/parser/collector.rb
index bcba952..0f90725 100644
--- a/lib/puppet/parser/collector.rb
+++ b/lib/puppet/parser/collector.rb
@@ -72,7 +72,8 @@ class Puppet::Parser::Collector
     def collect_exported
         # First get everything from the export table.  Just reuse our
         # collect_virtual method but tell it to use 'exported? for the test.
-        resources = collect_virtual(true).reject { |r| ! r.virtual? }
+        resources = collect_virtual(true).reject { |r| ! r.virtual? }.each { |r| r.exported = false }
+        #resources = collect_virtual(true).reject { |r| ! r.virtual? }
 
         count = resources.length
 
diff --git a/spec/unit/parser/collector.rb b/spec/unit/parser/collector.rb
index 2dfae67..ede583b 100755
--- a/spec/unit/parser/collector.rb
+++ b/spec/unit/parser/collector.rb
@@ -234,16 +234,16 @@ describe Puppet::Parser::Collector, "when collecting exported resources" do
         @collector.evaluate
     end
 
-    it "should return all matching resources from the current compile" do
+    it "should return all matching resources from the current compile and mark them non-virtual and non-exported" do
         stub_rails(true)
 
         one = stub 'one', :type => "Mytype", :virtual? => true, :exported? => true
         two = stub 'two', :type => "Mytype", :virtual? => true, :exported? => true
 
-        one.stubs(:exported=)
-        one.stubs(:virtual=)
-        two.stubs(:exported=)
-        two.stubs(:virtual=)
+        one.expects(:exported=).with(false)
+        one.expects(:virtual=).with(false)
+        two.expects(:exported=).with(false)
+        two.expects(:virtual=).with(false)
 
         @compiler.expects(:resources).returns([one, two])
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list