[25105] users/jberry/mpwa/app/models/port_pkg_file.rb
source_changes at macosforge.org
source_changes at macosforge.org
Sun May 13 20:20:47 PDT 2007
Revision: 25105
http://trac.macosforge.org/projects/macports/changeset/25105
Author: jberry at macports.org
Date: 2007-05-13 20:20:47 -0700 (Sun, 13 May 2007)
Log Message:
-----------
mpwa: small simplifications
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 03:14:32 UTC (rev 25104)
+++ users/jberry/mpwa/app/models/port_pkg_file.rb 2007-05-14 03:20:47 UTC (rev 25105)
@@ -54,8 +54,8 @@
# Create a new bob
blob = FileBlob.create(:port_pkg_file => self, :data => buf, :sequence => seq)
- length = length + buf.length
- seq = seq + 1
+ length += buf.length
+ seq += 1
end
# Finish up
@@ -76,19 +76,19 @@
seq = 0
while (length < self.length)
blob = FileBlob.find(:first, :conditions => "port_pkg_file_id=#{self.id} and sequence=#{seq}")
- raise PortPkgFileException, "file blob missing segment" if !blob
+ raise PortPkgFileException, "port_pkg_file missing segment" if !blob
buf = blob.data
sha256.update buf
file.write(buf)
- length = length + buf.length
+ length += buf.length
- seq = seq + 1
+ seq += 1
end
# Verify the digest
- raise PortPkgFileException, "digest mismatch while reading pkg_file #{self.id}" if sha256.hexdigest != self.sha256
+ raise PortPkgFileException, "digest mismatch while reading port_pkg_file #{self.id}" if sha256.hexdigest != self.sha256
end
def data()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070513/67219473/attachment.html
More information about the macports-changes
mailing list