From 40c1fb06162f2eebe6cd5e40a0e289cd568ec8e1 Mon Sep 17 00:00:00 2001 From: Markus Roberts Date: Sun, 21 Mar 2010 21:14:12 -0700 Subject: Resolving conflicts with ??? When checksum is a parameter corresponding to checksum_type in the filesets rather than a checksum "strategy" the value :none should generally be computed rather than provided. If neither a source nor contents are provided, there is no need for a checksum and thus it should be :none; otherwise, use the provided value (or, if it's nil, let it pass through and be replaced by the default (:md5) in the bowels of the beast). --- lib/puppet/type/file.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/puppet') diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb index efac1c835..8a21aa3f7 100644 --- a/lib/puppet/type/file.rb +++ b/lib/puppet/type/file.rb @@ -601,14 +601,14 @@ Puppet::Type.newtype(:file) do end def perform_recursion(path) - params = { + Puppet::FileServing::Metadata.search( + path, :links => self[:links], :recurse => (self[:recurse] == :remote ? true : self[:recurse]), :recurselimit => self[:recurselimit], - :ignore => self[:ignore] - } - params[:checksum_type] = self[:checksum] if self[:checksum] == :none - Puppet::FileServing::Metadata.search(path, params) + :ignore => self[:ignore], + :checksum_type => (self[:source] || self[:content]) ? self[:checksum] : :none + ) end # Remove any existing data. This is only used when dealing with -- cgit