[99754] trunk/base/src/port1.0/portchecksum.tcl
jmr at macports.org
jmr at macports.org
Fri Nov 16 05:26:45 PST 2012
Revision: 99754
https://trac.macports.org/changeset/99754
Author: jmr at macports.org
Date: 2012-11-16 05:26:44 -0800 (Fri, 16 Nov 2012)
Log Message:
-----------
rename HTML files with bad checksums with a .html extension for easy opening, and print the path
Modified Paths:
--------------
trunk/base/src/port1.0/portchecksum.tcl
Modified: trunk/base/src/port1.0/portchecksum.tcl
===================================================================
--- trunk/base/src/port1.0/portchecksum.tcl 2012-11-16 11:49:45 UTC (rev 99753)
+++ trunk/base/src/port1.0/portchecksum.tcl 2012-11-16 13:26:44 UTC (rev 99754)
@@ -280,6 +280,8 @@
&& "text/html" == $mimetype} {
# file --mime-type would be preferable to file --mime and strsed, but is only available as of Snow Leopard
set wrong_mimetype yes
+ set htmlfile_path ${fullpath}.html
+ file rename -force $fullpath $htmlfile_path
}
}
@@ -291,10 +293,6 @@
if {[tbool fail]} {
- # Show the desired checksum line for easy cut-paste
- ui_info "The correct checksum line may be:"
- ui_info [format "%-20s%s" "checksums" [join $sums [format " \\\n%-20s" ""]]]
-
if {[tbool wrong_mimetype]} {
# We got an HTML file, though the distfile name does not suggest that one was
# expected. Probably a helpful DNS server sent us to its search results page
@@ -305,6 +303,11 @@
ui_notice "for the checksum mismatch:"
ui_notice "<https://trac.macports.org/wiki/MisbehavingServers>"
ui_notice "***"
+ ui_notice "The file has been moved to: $htmlfile_path"
+ } else {
+ # Show the desired checksum line for easy cut-paste
+ ui_info "The correct checksum line may be:"
+ ui_info [format "%-20s%s" "checksums" [join $sums [format " \\\n%-20s" ""]]]
}
return -code error "[msgcat::mc "Unable to verify file checksums"]"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121116/fe283d0f/attachment-0001.html>
More information about the macports-changes
mailing list