Changeset 17383 for trunk/base


Ignore:
Timestamp:
Apr 10, 2006, 6:59:11 AM (14 years ago)
Author:
pguyot (Paul Guyot)
Message:

Fixed some bugs for using regex and livecheck.version.

File:
1 edited

Legend:

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

    r17375 r17383  
    22# portlivecheck.tcl
    33#
    4 # $Id: portlivecheck.tcl,v 1.4 2006/04/09 05:24:50 pguyot Exp $
     4# $Id: portlivecheck.tcl,v 1.5 2006/04/10 06:59:11 pguyot Exp $
    55#
    6 # Copyright (c) 2005 Paul Guyot <pguyot@kallisys.net>,
     6# Copyright (c) 2005-2006 Paul Guyot <pguyot@kallisys.net>,
    77# All rights reserved.
    88#
     
    4444
    4545# define options
    46 options livecheck.distfiles_check livecheck.url livecheck.update_check livecheck.md5 livecheck.name
     46options livecheck.distfiles_check livecheck.url livecheck.update_check livecheck.md5 livecheck.regex livecheck.name livecheck.version
    4747
    4848# defaults
     
    5858        global livecheck.distfiles_check livecheck.url livecheck.update_check livecheck.md5 livecheck.regex livecheck.name livecheck.version
    5959        global fetch.type
    60         global homepage portname portpath workpath version
     60        global homepage portname portpath workpath
    6161       
    6262        set updated 0
     
    6767
    6868        ui_debug "Portfile modification date is [clock format $port_moddate]"
    69         ui_debug "Port version is $version"
     69        ui_debug "Port (livecheck) version is ${livecheck.version}"
    7070
    7171        # Check the distfiles if it's a regular fetch phase.
     
    132132                                        }
    133133                                        if {[regexp ${livecheck.regex} $line line updated_version]} {
    134                                                 if {$updated_version != $version} {
     134                                                if {$updated_version != ${livecheck.version}} {
    135135                                                        set updated 1
    136136                                                } else {
     
    178178        if {${livecheck.update_check} != "none"} {
    179179                if {$updated > 0} {
    180                         ui_msg "$portname seems to have been updated (port version: $version, new version: $updated_version)"
     180                        ui_msg "$portname seems to have been updated (port version: ${livecheck.version}, new version: $updated_version)"
    181181                } elseif {$updated == 0} {
    182182                        ui_debug "$portname seems to be up to date"
Note: See TracChangeset for help on using the changeset viewer.