[69334] trunk/base/src/port1.0
jmr at macports.org
jmr at macports.org
Wed Jun 30 18:25:29 PDT 2010
Revision: 69334
http://trac.macports.org/changeset/69334
Author: jmr at macports.org
Date: 2010-06-30 18:25:24 -0700 (Wed, 30 Jun 2010)
Log Message:
-----------
look for patchfiles in alt prefix too (#25418), make clean --dist delete patchfiles in distpath, strip tags from distfiles when cleaning
Modified Paths:
--------------
trunk/base/src/port1.0/portclean.tcl
trunk/base/src/port1.0/portpatch.tcl
Modified: trunk/base/src/port1.0/portclean.tcl
===================================================================
--- 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
===================================================================
--- 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]
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100630/1c197b78/attachment.html>
More information about the macports-changes
mailing list