From bff94634075617339f65be15dc7eb3261db48f85 Mon Sep 17 00:00:00 2001 From: luke Date: Wed, 26 Apr 2006 16:20:58 +0000 Subject: 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 --- lib/puppet/type/pfile/checksum.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3