Changeset 32441
- Timestamp:
- 01/01/08 09:09:21 (11 months ago)
- Files:
-
- 1 modified
-
trunk/base/src/port1.0/portchecksum.tcl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/port1.0/portchecksum.tcl
r26177 r32441 185 185 # 186 186 proc checksum_main {args} { 187 global UI_PREFIX all_dist_files checksum s_array portverbose checksum.skip187 global UI_PREFIX all_dist_files checksum_types checksums_array portverbose checksum.skip 188 188 189 189 # If no files have been downloaded, there is nothing to checksum. … … 219 219 if {![info exists checksums_array($distfile)]} { 220 220 ui_error "[format [msgcat::mc "No checksum set for %s"] $distfile]" 221 ui_info "[format [msgcat::mc "Distfile checksum: %s md5 %s"] $distfile [calc_md5 $fullpath]]"222 ui_info "[format [msgcat::mc "Distfile checksum: %s sha1 %s"] $distfile [calc_sha1$fullpath]]"223 ui_info "[format [msgcat::mc "Distfile checksum: %s rmd160 %s"] $distfile [calc_rmd160 $fullpath]]"221 foreach type $checksum_types { 222 ui_info "[format [msgcat::mc "Distfile checksum: %s $type %s"] $distfile [calc_$type $fullpath]]" 223 } 224 224 set fail yes 225 225 } else { … … 242 242 } 243 243 } 244 244 245 } 245 246 } else { … … 249 250 250 251 if {[tbool fail]} { 252 253 # Show the desired checksum line for easy cut-paste 254 set sums "" 255 foreach distfile $all_dist_files { 256 if {[llength $all_dist_files] > 1} { 257 lappend sums $distfile 258 } 259 260 set fullpath [file join $distpath $distfile] 261 foreach type $checksum_types { 262 lappend sums [format "%-8s%s" $type [calc_$type $fullpath]] 263 } 264 } 265 ui_info "The correct checksum line may be:" 266 ui_info [format "%-20s%s" "checksums" [join $sums [format " \\\n%-20s" ""]]] 267 251 268 return -code error "[msgcat::mc "Unable to verify file checksums"]" 252 269 }

