summaryrefslogtreecommitdiffstats
path: root/lib/puppet/resource
diff options
context:
space:
mode:
authorMax Martin <max@puppetlabs.com>2011-04-07 11:29:54 -0700
committerMax Martin <max@puppetlabs.com>2011-04-07 11:29:54 -0700
commitda4457be4dedaed5368bacf81a08f0429e21cd45 (patch)
tree5c6149ed872d33f1f6711bac8a5b43f6dbd71a4a /lib/puppet/resource
parent1e4968e82a65b21ad5d075015830ef3f54efee05 (diff)
parentf7c6db9409e479ec1b54cfa85daa1ee51e5a7ad0 (diff)
downloadpuppet-da4457be4dedaed5368bacf81a08f0429e21cd45.tar.gz
puppet-da4457be4dedaed5368bacf81a08f0429e21cd45.tar.xz
puppet-da4457be4dedaed5368bacf81a08f0429e21cd45.zip
Merge branch '2.6.next' into 2.6.x
* 2.6.next: Fix #4339 - Locally save the last report to $lastrunreport Fix #4339 - Save a last run report summary to $statedir/last_run_summary.yaml Fixed #3127 - removed legacy debug code Fixed #3127 - Fixed gem selection regex (#5437) Invalidate cached TypeCollection when there was an error parsing (#6937) Adjust formatting of recurse's desc (#6937) Document the recurse parameter of File type. (#6893) Document the cron type in the case of specials. (#5670) Don't trigger refresh from a failed resource Fixed #6554 - Missing $haveftool if/else conditional in install.rb breaking Ruby 1.9
Diffstat (limited to 'lib/puppet/resource')
-rw-r--r--lib/puppet/resource/type_collection.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/puppet/resource/type_collection.rb b/lib/puppet/resource/type_collection.rb
index 347e1c0e0..4210475ad 100644
--- a/lib/puppet/resource/type_collection.rb
+++ b/lib/puppet/resource/type_collection.rb
@@ -166,12 +166,18 @@ class Puppet::Resource::TypeCollection
end
parser.parse
rescue => detail
+ @parse_failed = true
+
msg = "Could not parse for environment #{environment}: #{detail}"
error = Puppet::Error.new(msg)
error.set_backtrace(detail.backtrace)
raise error
end
+ def require_reparse?
+ @parse_failed || stale?
+ end
+
def stale?
@watched_files.values.detect { |file| file.changed? }
end