[25119] users/jberry/mpwa/app/models/port_pkg_file.rb
source_changes at macosforge.org
source_changes at macosforge.org
Mon May 14 06:29:06 PDT 2007
Revision: 25119
http://trac.macosforge.org/projects/macports/changeset/25119
Author: jberry at macports.org
Date: 2007-05-14 06:29:05 -0700 (Mon, 14 May 2007)
Log Message:
-----------
mpwa: it's a bit ludicrous to use a sha256 to verify our database consistency. Use the md5 instead
Modified Paths:
--------------
users/jberry/mpwa/app/models/port_pkg_file.rb
Modified: users/jberry/mpwa/app/models/port_pkg_file.rb
===================================================================
--- users/jberry/mpwa/app/models/port_pkg_file.rb 2007-05-14 13:17:47 UTC (rev 25118)
+++ users/jberry/mpwa/app/models/port_pkg_file.rb 2007-05-14 13:29:05 UTC (rev 25119)
@@ -69,7 +69,7 @@
def write_to_file(file)
# Create a digester so that we can verify the digest
- sha256 = Digest::SHA256.new
+ digest = Digest::MD5.new
# Page in the blobs, writing to file as we go
length = 0
@@ -79,7 +79,7 @@
raise PortPkgFileException, "port_pkg_file missing segment" if !blob
buf = blob.data
- sha256.update buf
+ digest.update buf
file.write(buf)
length += buf.length
@@ -88,7 +88,7 @@
end
# Verify the digest
- raise PortPkgFileException, "digest mismatch while reading port_pkg_file #{self.id}" if sha256.hexdigest != self.sha256
+ raise PortPkgFileException, "digest mismatch while reading port_pkg_file #{self.id}" if digest.hexdigest != self.md5
end
def data()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070514/f5d2fc62/attachment.html
More information about the macports-changes
mailing list