Changeset 141139 for trunk/base


Ignore:
Timestamp:
Oct 11, 2015, 5:34:17 PM (4 years ago)
Author:
jeremyhu@…
Message:

Use $default_checksum_types for handy copy/paste output on checksum failure

This should help adoption of better, more robust hashing algorithms.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portchecksum.tcl

    r138944 r141139  
    321321            # Show the desired checksum line for easy cut-paste
    322322            ui_info "The correct checksum line may be:"
    323             ui_info [format "%-20s%s" "checksums" [join $sums [format " \\\n%-20s" ""]]]
     323            #ui_info [format "%-20s%s" "checksums" [join $sums [format " \\\n%-20s" ""]]]
     324
     325            set default_sums {}
     326            foreach distfile $all_dist_files {
     327                if {[llength $all_dist_files] > 1} {
     328                    lappend default_sums $distfile
     329                }
     330
     331                foreach type $default_checksum_types {
     332                    lappend default_sums [format "%-8s%s" $type [calc_$type $fullpath]]
     333                }
     334            }
     335
     336            ui_info [format "%-20s%s" "checksums" [join $default_sums [format " \\\n%-20s" ""]]]
    324337        }
    325338
Note: See TracChangeset for help on using the changeset viewer.