Ignore:
Timestamp:
Apr 30, 2006, 5:32:52 AM (13 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/portutil.tcl

    r13741 r17792  
    11# et:ts=4
    22# portutil.tcl
    3 # $Id: portutil.tcl,v 1.190 2005/08/27 06:26:34 pguyot Exp $
     3# $Id: portutil.tcl,v 1.191 2006/04/30 05:32:52 pguyot Exp $
    44#
    55# Copyright (c) 2004 Robert Shaw <rshaw@opendarwin.org>
     
    401401    }
    402402}
     403
     404########### Distname utility functions ###########
     405
     406# Given a distribution file name, return the appended tag
     407# Example: getdisttag distfile.tar.gz:tag1 returns "tag1"
     408# / isn't included in the regexp, thus allowing port specification in URLs.
     409proc getdisttag {name} {
     410    if {[regexp {.+:([0-9A-Za-z_-]+)$} $name match tag]} {
     411        return $tag
     412    } else {
     413        return ""
     414    }
     415}
     416
     417# Given a distribution file name, return the name without an attached tag
     418# Example : getdistname distfile.tar.gz:tag1 returns "distfile.tar.gz"
     419# / isn't included in the regexp, thus allowing port specification in URLs.
     420proc getdistname {name} {
     421    regexp {(.+):[0-9A-Za-z_-]+$} $name match name
     422    return $name
     423}
     424
    403425
    404426########### Misc Utility Functions ###########
Note: See TracChangeset for help on using the changeset viewer.