[66626] trunk/base/src/port1.0/fetch_common.tcl
raimue at macports.org
raimue at macports.org
Sun Apr 18 04:52:17 PDT 2010
Revision: 66626
http://trac.macports.org/changeset/66626
Author: raimue at macports.org
Date: 2010-04-18 04:52:11 -0700 (Sun, 18 Apr 2010)
Log Message:
-----------
fetch_common.tcl: New helper function portfetch::get_urls to get a list of URLs
Modified Paths:
--------------
trunk/base/src/port1.0/fetch_common.tcl
Modified: trunk/base/src/port1.0/fetch_common.tcl
===================================================================
--- trunk/base/src/port1.0/fetch_common.tcl 2010-04-18 10:27:55 UTC (rev 66625)
+++ trunk/base/src/port1.0/fetch_common.tcl 2010-04-18 11:52:11 UTC (rev 66626)
@@ -257,3 +257,23 @@
}
}
}
+
+proc portfetch::get_urls {} {
+ variable fetch_urls
+ variable urlmap
+ set urls {}
+
+ portfetch::checkfiles fetch_urls
+
+ foreach {url_var distfile} $fetch_urls {
+ if {![info exists urlmap($url_var)]} {
+ ui_error [format [msgcat::mc "No defined site for tag: %s, using master_sites"] $url_var]
+ set urlmap($url_var) $master_sites
+ }
+ foreach site $urlmap($url_var) {
+ lappend urls $site
+ }
+ }
+
+ return $urls
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100418/c8924500/attachment.html>
More information about the macports-changes
mailing list