summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-04-26 16:20:58 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-04-26 16:20:58 +0000
commitbff94634075617339f65be15dc7eb3261db48f85 (patch)
tree4e107c9745edefc4e8e89341f41571564522684b
parentfeff3179043a5decd227d8d261770a771c7849c2 (diff)
downloadpuppet-bff94634075617339f65be15dc7eb3261db48f85.tar.gz
Adding sum type to the retrieved sum if it is not already there. This provides backwards compatibility for existing cache files.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1137 980ebf18-57e1-0310-9a29-db15c13687c0
-rwxr-xr-xlib/puppet/type/pfile/checksum.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/type/pfile/checksum.rb b/lib/puppet/type/pfile/checksum.rb
index c00fd7f7f..e43bb3d74 100755
--- a/lib/puppet/type/pfile/checksum.rb
+++ b/lib/puppet/type/pfile/checksum.rb
@@ -103,7 +103,12 @@ module Puppet
if hash.include?(sumtype)
#self.notice "Found checksum %s for %s" %
# [hash[sumtype] ,@parent[:path]]
- return hash[sumtype]
+ sum = hash[sumtype]
+
+ unless sum =~ /^\{\w+\}/
+ sum = "{%s}%s" % [sumtype, sum]
+ end
+ return sum
elsif hash.empty?
#self.notice "Could not find sum of type %s" % sumtype
return :nosum