[117049] trunk/base/src/port1.0/portchecksum.tcl
jmr at macports.org
jmr at macports.org
Thu Feb 13 16:15:07 PST 2014
Revision: 117049
https://trac.macports.org/changeset/117049
Author: jmr at macports.org
Date: 2014-02-13 16:15:07 -0800 (Thu, 13 Feb 2014)
Log Message:
-----------
add size check support to checksum phase
Modified Paths:
--------------
trunk/base/src/port1.0/portchecksum.tcl
Modified: trunk/base/src/port1.0/portchecksum.tcl
===================================================================
--- trunk/base/src/port1.0/portchecksum.tcl 2014-02-13 23:31:21 UTC (rev 117048)
+++ trunk/base/src/port1.0/portchecksum.tcl 2014-02-14 00:15:07 UTC (rev 117049)
@@ -53,13 +53,13 @@
set_ui_prefix
# The list of the types of checksums we know.
-set checksum_types "md5 sha1 rmd160 sha256"
+set checksum_types [list md5 sha1 rmd160 sha256 size]
# The number of types we know.
set checksum_types_count [llength $checksum_types]
# types to recommend if none are specified in the portfile
-set default_checksum_types {rmd160 sha256}
+set default_checksum_types [list rmd160 sha256]
# Using global all_dist_files, parse the checksums and store them into the
# global array checksums_array.
@@ -185,6 +185,15 @@
return [sha256 file $file]
}
+# calc_size
+#
+# Get the size of the given file.
+# Return the size.
+#
+proc portchecksum::calc_size {file} {
+ return [file size $file]
+}
+
# checksum_start
#
# Target prerun procedure; simply prints a message about what we're doing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140213/4df86913/attachment.html>
More information about the macports-changes
mailing list