Changeset 2070 for trunk/base
- Timestamp:
- Feb 23, 2003, 7:18:42 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/port1.0/portutil.tcl
r1790 r2070 640 640 # open file to store name of completed targets 641 641 proc open_statefile {args} { 642 global workpath portname 642 global workpath portname portpath 643 643 644 644 if ![file isdirectory $workpath ] { … … 647 647 # flock Portfile 648 648 set statefile [file join $workpath .darwinports.${portname}.state] 649 if {[file exists $statefile] && ![file writable $statefile]} { 650 return -code error "$statefile is not writable - check permission on port directory" 651 } 649 if {[file exists $statefile]} { 650 if {![file writable $statefile]} { 651 return -code error "$statefile is not writable - check permission on port directory" 652 } 653 if {[file mtime $statefile] < [file mtime ${portpath}/Portfile]} { 654 ui_msg "Portfile changed since last build; discarding previous state." 655 file delete $statefile 656 } 657 } 658 652 659 set fd [open $statefile a+] 653 660 if [catch {flock $fd -exclusive -noblock} result] { … … 669 676 proc check_statefile {class name fd} { 670 677 global portpath workdir 671 678 672 679 seek $fd 0 673 680 while {[gets $fd line] >= 0} {
Note: See TracChangeset
for help on using the changeset viewer.