Changeset 58336


Ignore:
Timestamp:
Sep 26, 2009, 9:21:09 PM (10 years ago)
Author:
toby@…
Message:

sshfs: remove unnecessary lunacy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/fuse/sshfs/Portfile

    r50980 r58336  
    4545    patch.pre_args -p1
    4646}
    47 
    48 pre-fetch {
    49     if {[variant_isset darwin]} {
    50         patch_checksum
    51     }
    52 }
    53 
    54 proc patch_checksum {} {
    55     global checksums_array UI_PREFIX
    56     # assume we only have one patchfile, because at the moment that's true
    57     set patchfile [option patchfiles]
    58     # do our own checksumming of an existing $patchfile because URL changes between revisions
    59     # if the checksum fails, delete the patchfile
    60     # a lot of this code is copied from checksum_main
    61     # Eventually this technique should be replaced with a patchfile dist subdir
    62     if {[file exists [option distpath]/$patchfile]} {
    63         ui_info "$UI_PREFIX $patchfile exists, checksumming to detect URL change"
    64         if {[parse_checksums [option checksums]] == "yes"} {
    65             ui_info "$UI_PREFIX [format [msgcat::mc "Checksumming %s"] $patchfile]"
    66             set fullpath [file join [option distpath] $patchfile]
    67             if {[info exists checksums_array($patchfile)]} {
    68                 set checksums $checksums_array($patchfile)
    69                
    70                 foreach {type sum} $checksums {
    71                     set calculated_sum [calc_$type $fullpath]
    72                     if {![string equal $sum $calculated_sum]} {
    73                         ui_debug "Checksum mismatch for $patchfile"
    74                         delete $fullpath
    75                         break
    76                     }
    77                 }
    78             }
    79         } else {
    80             return -code error "Unable to parse checksum string"
    81         }
    82     }
    83 }
Note: See TracChangeset for help on using the changeset viewer.