Changeset 14601 for trunk/base


Ignore:
Timestamp:
Oct 13, 2005, 7:45:49 PM (19 years ago)
Author:
pguyot (Paul Guyot)
Message:

Trash the distfile if the checksum doesn't match and -v wasn't provided.

File:
1 edited

Legend:

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

    r13738 r14601  
    11# et:ts=4
    22# portchecksum.tcl
    3 # $Id: portchecksum.tcl,v 1.44 2005/08/27 00:07:30 pguyot Exp $
     3# $Id: portchecksum.tcl,v 1.45 2005/10/13 19:45:49 pguyot Exp $
    44#
    55# Copyright (c) 2002 - 2004 Apple Computer, Inc.
     
    184184#
    185185proc checksum_main {args} {
    186         global UI_PREFIX all_dist_files checksums_array
     186        global UI_PREFIX all_dist_files checksums_array portverbose
    187187
    188188        # If no files have been downloaded, there is nothing to checksum.
     
    226226                                        } else {
    227227                                                ui_error "[format [msgcat::mc "Checksum (%s) mismatch for %s"] $type $distfile]"
     228                                                # if -v isn't specified, trash the distfile.
     229                                                if {${portverbose} == "no"} {
     230                                                        file delete -force ${fullpath}
     231                                                }
    228232                                                ui_info "[format [msgcat::mc "Portfile checksum: %s %s %s"] $distfile $type $sum]"
    229233                                                ui_info "[format [msgcat::mc "Distfile checksum: %s %s %s"] $distfile $type $calculated_sum]"
Note: See TracChangeset for help on using the changeset viewer.