Ignore:
Timestamp:
Apr 30, 2006, 5:32:52 AM (14 years ago)
Author:
pguyot (Paul Guyot)
Message:

Suffixes are supported in patchfiles specifications, but the patch command
actually didn't parse the filename and didn't even warn when the patch is not
applied because it cannot be found.

This change fixes that by:

  • moving the distname and disttag-related functions to portutil.tcl
  • fixing portfetch.tcl to actually end up with an error if a patch file cannot

be found (instead of silently ignoring it)

  • fixing portfetch.tcl to actually consider the distname part of the patch files

instead of the whole entry with the optional tag.

File:
1 edited

Legend:

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

    r17197 r17792  
    11# et:ts=4
    22# portfetch.tcl
    3 # $Id: portfetch.tcl,v 1.108 2006/03/27 21:32:27 jberry Exp $
     3# $Id: portfetch.tcl,v 1.109 2006/04/30 05:32:52 pguyot Exp $
    44#
    55# Copyright (c) 2002 - 2003 Apple Computer, Inc.
     
    133133        return "${site}${distfile}"
    134134    }
    135 }
    136 
    137 # Given a distribution file name, return the appended tag
    138 # Example: getdisttag distfile.tar.gz:tag1 returns "tag1"
    139 # / isn't included in the regexp, thus allowing port specification in URLs.
    140 proc getdisttag {name} {
    141     if {[regexp {.+:([0-9A-Za-z_-]+)$} $name match tag]} {
    142         return $tag
    143     } else {
    144         return ""
    145     }
    146 }
    147 
    148 # Given a distribution file name, return the name without an attached tag
    149 # Example : getdistname distfile.tar.gz:tag1 returns "distfile.tar.gz"
    150 # / isn't included in the regexp, thus allowing port specification in URLs.
    151 proc getdistname {name} {
    152     regexp {(.+):[0-9A-Za-z_-]+$} $name match name
    153     return $name
    154135}
    155136
Note: See TracChangeset for help on using the changeset viewer.