Changeset 1226 for trunk/base
- Timestamp:
- Nov 11, 2002, 9:11:24 AM (21 years ago)
- Location:
- trunk/base/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/darwinports1.0/darwinports.tcl
r1169 r1226 311 311 array set portinfo $line 312 312 if [info exists portinfo(portarchive)] { 313 set portinfo(porturl)${source}/$portinfo(portarchive)313 lappend line porturl ${source}/$portinfo(portarchive) 314 314 } elseif [info exists portinfo(portdir)] { 315 set portinfo(porturl)${source}/$portinfo(portdir)315 lappend line porturl ${source}/$portinfo(portdir) 316 316 } 317 317 lappend matches $name … … 332 332 333 333 proc dportmatch {regexp} { 334 global darwinports::portdbpath darwinports::sources 335 foreach source $sources { 336 if {[catch {set fd [open [darwinports::getindex $source] r]} result]} { 337 return -code error "Can't open index file for source $source. Have you synced your source indexes?" 338 } 339 while {[gets $fd line] >= 0} { 340 set name [lindex $line 0] 341 if {[regexp -- $regexp $name] == 1} { 342 gets $fd line 343 array set portinfo $line 344 if [info exists portinfo(portarchive)] { 345 set portinfo(porturl) ${source}/$portinfo(portarchive) 346 } elseif [info exists portinfo(portdir)] { 347 set portinfo(porturl) ${source}/$portinfo(portdir) 348 } 349 close $fd 350 return [array get portinfo] 351 } else { 352 set len [lindex $line 1] 353 seek $fd $len current 354 } 355 } 356 close $fd 357 } 334 return -code error "dportmatch has been deprecated, use dportsearch instead." 358 335 } 359 336 -
trunk/base/src/port/port.tcl
r1066 r1226 153 153 set target $action 154 154 if {[info exists portname]} { 155 if {[catch { array set portinfo [dportmatch ^$portname\$]} result]} {155 if {[catch {set res [dportsearch ^$portname\$]} result]} { 156 156 puts $result 157 157 exit 1 158 158 } 159 if {[ array size portinfo] == 0} {159 if {[llength $res] < 2} { 160 160 puts "Port $portname not found" 161 161 exit 1 162 162 } 163 array set portinfo [lindex $res 1] 163 164 set porturl $portinfo(porturl) 164 165 } -
trunk/base/src/port1.0/portutil.tcl
r1176 r1226 1077 1077 array set options [list] 1078 1078 array set variations [list] 1079 array set portinfo [dportmatch ^$portname\$]1080 if {[ array size portinfo] == 0} {1079 set res [dportsearch ^$portname\$] 1080 if {[llength $res] < 2} { 1081 1081 ui_error "Dependency $portname not found" 1082 1082 return -1 1083 1083 } 1084 array set portinfo [lindex $res 1] 1084 1085 set porturl $portinfo(porturl) 1085 1086
Note: See TracChangeset
for help on using the changeset viewer.