Modified: trunk/base/src/port1.0/portclean.tcl (69333 => 69334)
--- trunk/base/src/port1.0/portclean.tcl 2010-07-01 00:01:13 UTC (rev 69333)
+++ trunk/base/src/port1.0/portclean.tcl 2010-07-01 01:25:24 UTC (rev 69334)
@@ -97,7 +97,8 @@
# remove known distfiles for sure (if they exist)
set count 0
foreach file $distfiles {
- set distfile [file join $distpath $file]
+ set distfile [file join $distpath [getdistname $file]]
+ ui_debug "Looking for $distfile"
if {[file isfile $distfile]} {
ui_debug "Removing file: $distfile"
if {[catch {delete $distfile} result]} {
@@ -121,6 +122,33 @@
ui_debug "No distfiles found to remove at $distpath"
}
+ set count 0
+ foreach file [option patchfiles] {
+ set patchfile [file join $distpath [getdistname $file]]
+ ui_debug "Looking for $patchfile"
+ if {[file isfile $patchfile]} {
+ ui_debug "Removing file: $patchfile"
+ if {[catch {delete $patchfile} result]} {
+ ui_debug "$::errorInfo"
+ ui_error "$result"
+ }
+ incr count
+ }
+ if {!$usealtworkpath && [file isfile ${altprefix}${patchfile}]} {
+ ui_debug "Removing file: ${altprefix}${patchfile}"
+ if {[catch {delete ${altprefix}${patchfile}} result]} {
+ ui_debug "$::errorInfo"
+ ui_error "$result"
+ }
+ incr count
+ }
+ }
+ if {$count > 0} {
+ ui_debug "$count patchfile(s) removed."
+ } else {
+ ui_debug "No patchfiles found to remove at $distpath"
+ }
+
# next remove dist_subdir if only needed for this port,
# or if user forces us to
set dirlist [list]
Modified: trunk/base/src/port1.0/portpatch.tcl (69333 => 69334)
--- trunk/base/src/port1.0/portpatch.tcl 2010-07-01 00:01:13 UTC (rev 69333)
+++ trunk/base/src/port1.0/portpatch.tcl 2010-07-01 01:25:24 UTC (rev 69334)
@@ -68,7 +68,7 @@
}
proc portpatch::patch_main {args} {
- global UI_PREFIX
+ global UI_PREFIX usealtworkpath altprefix
# First make sure that patchfiles exists and isn't stubbed out.
if {![exists patchfiles] || [option patchfiles] == ""} {
@@ -83,6 +83,8 @@
lappend patchlist [option filespath]/$patch_file
} elseif {[file exists [option distpath]/$patch_file]} {
lappend patchlist [option distpath]/$patch_file
+ } elseif {!$usealtworkpath && [file exists "${altprefix}[option distpath]/$patch_file"]} {
+ lappend patchlist "${altprefix}[option distpath]/$patch_file"
} else {
return -code error [format [msgcat::mc "Patch file %s is missing"] $patch]
}