Changeset 15873 for trunk/base


Ignore:
Timestamp:
Jan 16, 2006, 4:33:25 AM (15 years ago)
Author:
jberry
Message:

Bug: 6522
Submitted by: Randall Wood

Port upgrade was not properly protecting the provided portname against regex patterns.
Use the new (1.2) exact search option to dportsearch to avoid regex all together
while looking for the portname. This allows us to accept portnames that contain
regex patterns, like libsigc++2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/darwinports1.0/darwinports.tcl

    r15872 r15873  
    11# darwinports.tcl
    2 # $Id: darwinports.tcl,v 1.204 2006/01/16 04:15:38 jberry Exp $
     2# $Id: darwinports.tcl,v 1.205 2006/01/16 04:33:25 jberry Exp $
    33#
    44# Copyright (c) 2002 Apple Computer, Inc.
     
    14351435
    14361436# upgrade procedure
    1437 proc darwinports::upgrade {pname dspec variationslist optionslist {depscachename ""}} {
     1437proc darwinports::upgrade {portname dspec variationslist optionslist {depscachename ""}} {
    14381438        array set options $optionslist
    14391439        array set variations $variationslist
     
    14451445        set epoch_override 0
    14461446
    1447         # check if pname contains \, if so remove it.
    1448         if { [regexp {\\} $pname] } {
    1449                 set portname [join $pname {\\}]
    1450                 ui_debug "removing stray ecape-character for $portname"
    1451         } else {
    1452                 set portname $pname
    1453         }
    1454 
    14551447        # check if the port is in tree
    1456         if {[catch {dportsearch ^$pname$} result]} {
     1448        if {[catch {dportsearch $portname false exact} result]} {
    14571449                global errorInfo
    14581450                ui_debug "$errorInfo"
Note: See TracChangeset for help on using the changeset viewer.