The first patch for #2994, to which this is an extension, exposed
the fact that checksums where not being included in the metadata
for links; checksums are needed for managing the contents of files
that are represented on the server as links (links => follow).

Signed-off-by: Markus Roberts <[email protected]>
---
 lib/puppet/file_serving/metadata.rb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/file_serving/metadata.rb 
b/lib/puppet/file_serving/metadata.rb
index 275a090..d5a3f99 100644
--- a/lib/puppet/file_serving/metadata.rb
+++ b/lib/puppet/file_serving/metadata.rb
@@ -30,7 +30,7 @@ class Puppet::FileServing::Metadata < 
Puppet::FileServing::Base
 
         case ftype
         when "file", "directory"; desc << checksum
-        when "link"; desc << @destination
+        when "link"; desc << @destination << checksum
         else
             raise ArgumentError, "Cannot manage files of type %s" % ftype
         end
@@ -66,6 +66,7 @@ class Puppet::FileServing::Metadata < 
Puppet::FileServing::Base
             @checksum = ("{%s}" % @checksum_type) + send("%s_file" % 
@checksum_type, path).to_s
         when "link"
             @destination = File.readlink(real_path)
+            @checksum = ("{%s}" % @checksum_type) + send("%s_file" % 
@checksum_type, real_path).to_s
         else
             raise ArgumentError, "Cannot manage files of type %s" % stat.ftype
         end
-- 
1.6.4

--

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