RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/darwinports1.0/darwinports.tcl,v
retrieving revision 1.142
diff -u -r1.142 darwinports.tcl
|
|
|
549 | 549 | return [_dportsearchpath $depregex $search_path] |
550 | 550 | } |
551 | 551 | |
| 552 | ### _porttest is private; subject to change without notice |
| 553 | |
| 554 | proc _porttest {dport depspec} { |
| 555 | # We don't actually look for the port, but just return false |
| 556 | # in order to let the dportdepends handle the dependency |
| 557 | return 0 |
| 558 | } |
| 559 | |
552 | 560 | ### _dportinstalled is private; may change without notice |
553 | 561 | |
554 | 562 | # Determine if a port is already *installed*, as in "in the registry". |
… |
… |
|
564 | 572 | } |
565 | 573 | } |
566 | 574 | |
567 | | ### _dporispresent is private; may change without notice |
| 575 | ### _dportispresent is private; may change without notice |
568 | 576 | |
569 | 577 | # Determine if some depspec is satisfied or if the given port is installed. |
570 | 578 | # We actually start with the registry (faster?) |
… |
… |
|
591 | 599 | lib { return [_libtest $dport $depspec] } |
592 | 600 | bin { return [_bintest $dport $depspec] } |
593 | 601 | path { return [_pathtest $dport $depspec] } |
| 602 | port { return [_porttest $dport $depspec] } |
594 | 603 | default {return -code error "unknown depspec type: $type"} |
595 | 604 | } |
596 | 605 | return 0 |
RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port1.0/portdepends.tcl,v
retrieving revision 1.38
diff -u -r1.38 portdepends.tcl
|
|
|
46 | 46 | switch -regex $action { |
47 | 47 | set|append|delete { |
48 | 48 | foreach depspec $args { |
49 | | if {[regexp {([A-Za-z\./0-9]+):([A-Za-z0-9_/\-\.$^\?\+\(\)\|\\]+):([-A-Za-z\./0-9_]+)} "$depspec" match deppath depregex portname]} { |
50 | | switch $deppath { |
51 | | lib {} |
52 | | bin {} |
53 | | path {} |
| 49 | if {[regexp {([A-Za-z\./0-9]+):([A-Za-z0-9_/\-\.$^\?\+\(\)\|\\]*):([-A-Za-z\./0-9_]+)} "$depspec" match deppath depregex portname]} { |
| 50 | switch -regex $deppath { |
| 51 | lib|bin|path { |
| 52 | if {[string length $depregex] == 0} { |
| 53 | return -code error [format [msgcat::mc "invalid depspec: %s (missing regex component)"] $depspec] |
| 54 | } |
| 55 | } |
| 56 | port {} |
54 | 57 | default {return -code error [format [msgcat::mc "unknown depspec type: %s"] $deppath]} |
55 | 58 | } |
56 | 59 | } else { |