diff options
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/node/catalog.rb | 4 | ||||
-rwxr-xr-x | lib/puppet/type/file/content.rb | 1 | ||||
-rwxr-xr-x | lib/puppet/type/file/source.rb | 4 |
3 files changed, 7 insertions, 2 deletions
diff --git a/lib/puppet/node/catalog.rb b/lib/puppet/node/catalog.rb index e82e63444..f6c0a1959 100644 --- a/lib/puppet/node/catalog.rb +++ b/lib/puppet/node/catalog.rb @@ -118,6 +118,10 @@ class Puppet::Node::Catalog < Puppet::SimpleGraph def apply(options = {}) @applying = true + # Expire all of the resource data -- this ensures that all + # data we're operating against is entirely current. + expire() + Puppet::Util::Storage.load if host_config? transaction = Puppet::Transaction.new(self) diff --git a/lib/puppet/type/file/content.rb b/lib/puppet/type/file/content.rb index 169ba9078..635cdc809 100755 --- a/lib/puppet/type/file/content.rb +++ b/lib/puppet/type/file/content.rb @@ -58,6 +58,7 @@ module Puppet if self.should return super elsif source = resource.parameter(:source) + fail "Got a remote source with no checksum" unless source.checksum unless sum_method = sumtype(source.checksum) fail "Could not extract checksum type from source checksum '%s'" % source.checksum end diff --git a/lib/puppet/type/file/source.rb b/lib/puppet/type/file/source.rb index 4e67b1a8b..a6ab5daaf 100755 --- a/lib/puppet/type/file/source.rb +++ b/lib/puppet/type/file/source.rb @@ -93,8 +93,8 @@ module Puppet end def checksum - if defined?(@metadata) - @metadata.checksum + if metadata + metadata.checksum else nil end |