[61302] trunk/base/src/upgrade_sources_conf_default.tcl
jmr at macports.org
jmr at macports.org
Tue Dec 8 03:50:08 PST 2009
Revision: 61302
http://trac.macports.org/changeset/61302
Author: jmr at macports.org
Date: 2009-12-08 03:50:06 -0800 (Tue, 08 Dec 2009)
Log Message:
-----------
stop upgrade_sources_conf_default.tcl from erroring when there are svn sources but no svn command, and allow it to find svn in ${prefix}/bin (#20760)
Modified Paths:
--------------
trunk/base/src/upgrade_sources_conf_default.tcl
Modified: trunk/base/src/upgrade_sources_conf_default.tcl
===================================================================
--- trunk/base/src/upgrade_sources_conf_default.tcl 2009-12-08 11:36:03 UTC (rev 61301)
+++ trunk/base/src/upgrade_sources_conf_default.tcl 2009-12-08 11:50:06 UTC (rev 61302)
@@ -42,7 +42,20 @@
set addDefault true
} elseif {[regexp {file://(/.+)} $url -> filepath]} {
if {[file exists [file join ${filepath} .svn]]} {
- if {![catch {set svnChannel [open "|svn info ${filepath}" r]} err]} {
+ if {![info exists svnCmd]} {
+ set svnCmd ""
+ foreach path [concat [list ${prefix}/bin] [split $env(PATH) :]] {
+ if {[file executable ${path}/svn]} {
+ set svnCmd ${path}/svn
+ break
+ }
+ }
+ }
+ if {$svnCmd == ""} {
+ puts "WARNING: Unable to check svn URL for '$filepath' because no svn command could be found; please manually verify $sourcesConf!"
+ continue
+ }
+ if {![catch {set svnChannel [open "|$svnCmd info ${filepath}" r]} err]} {
set svnURL {}
while {[gets $svnChannel svnLine] >= 0} {
regexp {^URL: (.*)} $svnLine -> svnURL
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091208/7b945f61/attachment.html>
More information about the macports-changes
mailing list