diff --git a/src/port1.0/portpatch.tcl b/src/port1.0/portpatch.tcl
index d34e266..68aef41 100644
a
|
b
|
proc portpatch::build_getpatchtype {args} { |
69 | 69 | } |
70 | 70 | |
71 | 71 | proc portpatch::patch_main {args} { |
72 | | global UI_PREFIX usealtworkpath altprefix |
| 72 | global UI_PREFIX usealtworkpath altprefix target_state_fd |
73 | 73 | |
74 | 74 | # First make sure that patchfiles exists and isn't stubbed out. |
75 | 75 | if {![exists patchfiles] || [option patchfiles] eq ""} { |
… |
… |
proc portpatch::patch_main {args} { |
97 | 97 | set gzcat "[findBinary gzip $portutil::autoconf::gzip_path] -dc" |
98 | 98 | set bzcat "[findBinary bzip2 $portutil::autoconf::bzip2_path] -dc" |
99 | 99 | foreach patch $patchlist { |
100 | | ui_info "$UI_PREFIX [format [msgcat::mc "Applying %s"] [file tail $patch]]" |
101 | | switch -- [file extension $patch] { |
102 | | .Z - |
103 | | .gz {command_exec patch "$gzcat \"$patch\" | (" ")"} |
104 | | .bz2 {command_exec patch "$bzcat \"$patch\" | (" ")"} |
105 | | default {command_exec patch "" "< '$patch'"} |
| 100 | set pfile [file tail $patch] |
| 101 | if {![check_statefile patch $pfile $target_state_fd]} { |
| 102 | ui_info "$UI_PREFIX [format [msgcat::mc "Applying %s"] $pfile]" |
| 103 | switch -- [file extension $patch] { |
| 104 | .Z - |
| 105 | .gz {command_exec patch "$gzcat \"$patch\" | (" ")"} |
| 106 | .bz2 {command_exec patch "$bzcat \"$patch\" | (" ")"} |
| 107 | default {command_exec patch "" "< '$patch'"} |
| 108 | } |
| 109 | write_statefile patch $pfile $target_state_fd |
| 110 | } else { |
| 111 | ui_info "$UI_PREFIX [format [msgcat::mc "Skipping already applied %s"] $pfile]" |
106 | 112 | } |
107 | 113 | } |
108 | 114 | return 0 |