Changeset 8952


Ignore:
Timestamp:
Oct 26, 2004, 8:30:07 PM (15 years ago)
Author:
toby
Message:

Fix fortune port. Basically, if multiple checksums and one distfile are specified, it may erroneously detect the short checksums format.

File:
1 edited

Legend:

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

    r8175 r8952  
    116116        }
    117117
    118         # If there is only one file and an even number of arguments are specified,
    119         # then we are using the short form for checksums.
    120         if {[llength $all_dist_files] == 1 && [expr [llength [option checksums]] % 2] == 0} {
     118        # We are using a short checksum form if:
     119        # (1) There is only one distfile.
     120        # (2) There are an even number of words in checksums (i.e. "md5 cksum sha1 cksum" = 4 words).
     121        # (3) There are no more than 2 checksums specified.
     122        # * XXX 2 should be number of checksum types, hardcoding for now.
     123        if {[llength $all_dist_files] == 1 && [expr [llength [option checksums]] % 2] == 0 && [expr [llength [option checksums]] / 2] <= 2} {
    121124                option checksums [linsert [option checksums] 0 $all_dist_files]
    122125        }
Note: See TracChangeset for help on using the changeset viewer.