[69336] branches/release_1_9/base/src/port1.0
jmr at macports.org
jmr at macports.org
Wed Jun 30 18:32:50 PDT 2010
Revision: 69336
http://trac.macports.org/changeset/69336
Author: jmr at macports.org
Date: 2010-06-30 18:32:50 -0700 (Wed, 30 Jun 2010)
Log Message:
-----------
merge r69334, r69335 from trunk:
look for patchfiles in alt prefix too (#25418), make clean --dist delete patchfiles in distpath, strip tags from distfiles when cleaning
Revision Links:
--------------
http://trac.macports.org/changeset/69334
http://trac.macports.org/changeset/69335
Modified Paths:
--------------
branches/release_1_9/base/src/port1.0/portclean.tcl
branches/release_1_9/base/src/port1.0/portpatch.tcl
Modified: branches/release_1_9/base/src/port1.0/portclean.tcl
===================================================================
--- branches/release_1_9/base/src/port1.0/portclean.tcl 2010-07-01 01:30:34 UTC (rev 69335)
+++ branches/release_1_9/base/src/port1.0/portclean.tcl 2010-07-01 01:32:50 UTC (rev 69336)
@@ -97,7 +97,9 @@
# remove known distfiles for sure (if they exist)
set count 0
foreach file $distfiles {
- set distfile [file join $distpath $file]
+ set distfile [getdistname $file]
+ ui_debug "Looking for $distfile"
+ set distfile [file join $distpath $distfile]
if {[file isfile $distfile]} {
ui_debug "Removing file: $distfile"
if {[catch {delete $distfile} result]} {
@@ -121,6 +123,34 @@
ui_debug "No distfiles found to remove at $distpath"
}
+ set count 0
+ foreach file [option patchfiles] {
+ set patchfile [getdistname $file]
+ ui_debug "Looking for $patchfile"
+ set patchfile [file join $distpath $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: branches/release_1_9/base/src/port1.0/portpatch.tcl
===================================================================
--- branches/release_1_9/base/src/port1.0/portpatch.tcl 2010-07-01 01:30:34 UTC (rev 69335)
+++ branches/release_1_9/base/src/port1.0/portpatch.tcl 2010-07-01 01:32:50 UTC (rev 69336)
@@ -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/5a02daba/attachment-0001.html>
More information about the macports-changes
mailing list