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.

Signed-off-by: Luke Kanies <[EMAIL PROTECTED]>
---
 CHANGELOG                      |    3 +++
 lib/puppet/parser/collector.rb |    3 ++-
 spec/unit/parser/collector.rb  |   10 +++++-----
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 2b61921..e6a6597 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,7 @@
 0.24.x
+    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])
 
-- 
1.5.3.7


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to