summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/collector.rb11
-rw-r--r--lib/puppet/parser/interpreter.rb7
2 files changed, 15 insertions, 3 deletions
diff --git a/lib/puppet/parser/collector.rb b/lib/puppet/parser/collector.rb
index 9eae4cc4a..daed149f3 100644
--- a/lib/puppet/parser/collector.rb
+++ b/lib/puppet/parser/collector.rb
@@ -7,7 +7,7 @@ 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)
+ resources = collect_virtual(true).reject { |r| ! r.virtual? }
count = 0
@@ -43,7 +43,7 @@ class Puppet::Parser::Collector
end
end
- scope.debug("Collected %s %s resource%s in %.2f seconds" %
+ scope.info("Collected %s %s resource%s in %.2f seconds" %
[count, @type, count == 1 ? "" : "s", time])
return resources
@@ -113,6 +113,13 @@ class Puppet::Parser::Collector
return objects
end
end
+
+# if objects and ! objects.empty?
+# objects.each { |r| r.virtual = false }
+# return objects
+# else
+# return false
+# end
end
def initialize(scope, type, equery, vquery, form)
diff --git a/lib/puppet/parser/interpreter.rb b/lib/puppet/parser/interpreter.rb
index 24de0904e..5a8227ec0 100644
--- a/lib/puppet/parser/interpreter.rb
+++ b/lib/puppet/parser/interpreter.rb
@@ -135,7 +135,11 @@ class Puppet::Parser::Interpreter
coll.each do |c|
# Only keep the loop going if we actually successfully
# collected something.
- if c.evaluate
+ if o = c.evaluate
+ o.each do |r|
+ Puppet.info "Resource %s: v: %s, e: %s" %
+ [r.ref, r.virtual?.inspect, r.exported.inspect]
+ end
done = false
end
end
@@ -145,6 +149,7 @@ class Puppet::Parser::Interpreter
# Then evaluate any defined types.
if ary = scope.unevaluated
ary.each do |resource|
+ Puppet.info "Evaluated %s" % resource.ref
resource.evaluate
end
# If we evaluated, then loop through again.