[66847] trunk/base/src/macports1.0/macports.tcl
jmr at macports.org
jmr at macports.org
Fri Apr 23 13:29:22 PDT 2010
Revision: 66847
http://trac.macports.org/changeset/66847
Author: jmr at macports.org
Date: 2010-04-23 13:29:20 -0700 (Fri, 23 Apr 2010)
Log Message:
-----------
exclude PortIndex from rsync if it already exists
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2010-04-23 19:10:16 UTC (rev 66846)
+++ trunk/base/src/macports1.0/macports.tcl 2010-04-23 20:29:20 UTC (rev 66847)
@@ -1848,14 +1848,20 @@
}
{^rsync$} {
# Where to, boss?
- set destdir [file dirname [macports::getindex $source]]
+ set indexfile [macports::getindex $source]
+ set destdir [file dirname $indexfile]
file mkdir $destdir
# Keep rsync happy with a trailing slash
if {[string index $source end] != "/"} {
set source "${source}/"
}
+ # don't sync PortIndex unless it doesn't exist
+ set exclude_option ""
+ if {[file isfile $indexfile]} {
+ set exclude_option " '--exclude=/PortIndex*'"
+ }
# Do rsync fetch
- set rsync_commandline "${macports::autoconf::rsync_path} ${rsync_options} ${source} ${destdir}"
+ set rsync_commandline "${macports::autoconf::rsync_path} ${rsync_options}${exclude_option} ${source} ${destdir}"
ui_debug $rsync_commandline
if {[catch {system $rsync_commandline}]} {
ui_error "Synchronization of the local ports tree failed doing rsync"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100423/fcb5e72b/attachment.html>
More information about the macports-changes
mailing list