Ticket #2438: patch-darwinports.tcl

File patch-darwinports.tcl, 1.3 KB (added by jberry@…, 20 years ago)

Patch to base/src/darwinports1.0/darwinports.tcl

Line 
1Index: base/src/darwinports1.0/darwinports.tcl
2===================================================================
3RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/darwinports1.0/darwinports.tcl,v
4retrieving revision 1.140
5diff -u -r1.140 darwinports.tcl
6--- base/src/darwinports1.0/darwinports.tcl     20 Nov 2004 00:40:55 -0000      1.140
7+++ base/src/darwinports1.0/darwinports.tcl     1 Dec 2004 18:31:21 -0000
8@@ -435,7 +435,7 @@
9 
10 ### _dportsearchpath is private; subject to change without notice
11 
12-proc _dportsearchpath {depregex search_path} {
13+proc _dportsearchpath {depregex search_path { test readable } } {
14     set found 0
15     foreach path $search_path {
16        if {![file isdirectory $path]} {
17@@ -446,9 +446,9 @@
18                return -code error "$result ($path)"
19                set filelist ""
20        }
21-
22+       
23        foreach filename $filelist {
24-           if {[regexp $depregex $filename] == 1} {
25+           if {[regexp $depregex $filename] && [file $test [file join $path $filename]]} {
26                ui_debug "Found Dependency: path: $path filename: $filename regex: $depregex"
27                set found 1
28                break
29@@ -513,7 +513,7 @@
30       
31        set depregex \^$depregex\$
32       
33-       return [_dportsearchpath $depregex $search_path]
34+       return [_dportsearchpath $depregex $search_path executable]
35 }
36 
37 ### _pathtest is private; subject to change without notice