[24917] branches/dp2mp-move/base/src/macports1.0/macports.tcl
source_changes at macosforge.org
source_changes at macosforge.org
Mon May 7 22:50:50 PDT 2007
Revision: 24917
http://trac.macosforge.org/projects/macports/changeset/24917
Author: jmpp at macports.org
Date: 2007-05-07 22:50:50 -0700 (Mon, 07 May 2007)
Log Message:
-----------
I accidentally retabbed a couple of lines in the mportsync proc and then couldn't go back... so why not go for the whole thing??
NOTE: I'm a fast runner, so you're gonna have to keep up if you want to lynch me!
Modified Paths:
--------------
branches/dp2mp-move/base/src/macports1.0/macports.tcl
Modified: branches/dp2mp-move/base/src/macports1.0/macports.tcl
===================================================================
--- branches/dp2mp-move/base/src/macports1.0/macports.tcl 2007-05-08 05:50:19 UTC (rev 24916)
+++ branches/dp2mp-move/base/src/macports1.0/macports.tcl 2007-05-08 05:50:50 UTC (rev 24917)
@@ -1162,62 +1162,60 @@
}
proc mportsync {args} {
- global macports::sources macports::portdbpath macports::rsync_options tcl_platform
- global macports::autoconf::rsync_path
-
- foreach source $sources {
- ui_info "Synchronizing from $source"
- switch -regexp -- [macports::getprotocol $source] {
- {^file$} {
- set portdir [macports::getportdir $source]
- if {[file exists $portdir/.svn]} {
- if {[catch {set svncmd [macports::binaryInPath "svn"]}] == 0} {
- set svn_commandline "${svncmd} update --non-interactive \"${portdir}\""
- ui_debug $svn_commandline
- if {[catch {system $svn_commandline}]} {
- return -code error "sync failed doing svn update"
- }
- if {[catch {system "chmod -R a+r \"${portdir}\""}]} {
- ui_warn "Setting world read permissions on parts of the ports tree failed, need root?"
- }
- } else {
- return -code error "svn command not found"
- }
- }
+ global macports::sources macports::portdbpath macports::rsync_options tcl_platform
+ global macports::autoconf::rsync_path
+
+ foreach source $sources {
+ ui_info "Synchronizing from $source"
+ switch -regexp -- [macports::getprotocol $source] {
+ {^file$} {
+ set portdir [macports::getportdir $source]
+ if {[file exists $portdir/.svn]} {
+ if {[catch {set svncmd [macports::binaryInPath "svn"]}] == 0} {
+ set svn_commandline "${svncmd} update --non-interactive \"${portdir}\""
+ ui_debug $svn_commandline
+ if {[catch {system $svn_commandline}]} {
+ return -code error "sync failed doing svn update"
}
- {^mports$} {
- macports::index::sync $macports::portdbpath $source
+ if {[catch {system "chmod -R a+r \"${portdir}\""}]} {
+ ui_warn "Setting world read permissions on parts of the ports tree failed, need root?"
}
- {^rsync$} {
- # Where to, boss?
- set destdir [file dirname [macports::getindex $source]]
-
- if {[catch {file mkdir $destdir} result]} {
- return -code error $result
- }
-
- # Keep rsync happy with a trailing slash
- if {[string index $source end] != "/"} {
- set source "${source}/"
- }
-
- # Do rsync fetch
- if {[catch {system "${macports::autoconf::rsync_path} $rsync_options \"$source\" \"$destdir\""}]} {
- return -code error "sync failed doing rsync"
- }
- if {[catch {system "chmod -R a+r \"$destdir\""}]} {
- ui_warn "Setting world read permissions on parts of the ports tree failed, need root?"
- }
- }
- {^https?$|^ftp$} {
- set indexfile [macports::getindex $source]
- if {[catch {file mkdir [file dirname $indexfile]} result]} {
- return -code error $result
- }
- exec curl -L -s -S -o $indexfile $source/PortIndex
- }
+ } else {
+ return -code error "svn command not found"
+ }
}
+ }
+ {^mports$} {
+ macports::index::sync $macports::portdbpath $source
+ }
+ {^rsync$} {
+ # Where to, boss?
+ set destdir [file dirname [macports::getindex $source]]
+
+ if {[catch {file mkdir $destdir} result]} {
+ return -code error $result
+ }
+ # Keep rsync happy with a trailing slash
+ if {[string index $source end] != "/"} {
+ set source "${source}/"
+ }
+ # Do rsync fetch
+ if {[catch {system "${macports::autoconf::rsync_path} $rsync_options \"$source\" \"$destdir\""}]} {
+ return -code error "sync failed doing rsync"
+ }
+ if {[catch {system "chmod -R a+r \"$destdir\""}]} {
+ ui_warn "Setting world read permissions on parts of the ports tree failed, need root?"
+ }
+ }
+ {^https?$|^ftp$} {
+ set indexfile [macports::getindex $source]
+ if {[catch {file mkdir [file dirname $indexfile]} result]} {
+ return -code error $result
+ }
+ exec curl -L -s -S -o $indexfile $source/PortIndex
+ }
}
+ }
}
proc mportsearch {pattern {case_sensitive yes} {matchstyle regexp} {field name}} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070507/d8257aeb/attachment.html
More information about the macports-changes
mailing list