[52398] trunk/base/src/port1.0/portfetch.tcl

raimue at macports.org raimue at macports.org
Mon Jun 15 15:40:24 PDT 2009


Revision: 52398
          http://trac.macports.org/changeset/52398
Author:   raimue at macports.org
Date:     2009-06-15 15:40:24 -0700 (Mon, 15 Jun 2009)
Log Message:
-----------
port1.0/portfetch.tcl:
Pass URL list by reference instead of using a namespace variable.

Modified Paths:
--------------
    trunk/base/src/port1.0/portfetch.tcl

Modified: trunk/base/src/port1.0/portfetch.tcl
===================================================================
--- trunk/base/src/port1.0/portfetch.tcl	2009-06-15 20:27:29 UTC (rev 52397)
+++ trunk/base/src/port1.0/portfetch.tcl	2009-06-15 22:40:24 UTC (rev 52398)
@@ -334,9 +334,9 @@
 }
 
 # Checks patch files and their tags to assemble url lists for later fetching
-proc portfetch::checkpatchfiles {args} {
+proc portfetch::checkpatchfiles {urls} {
     global patchfiles all_dist_files patch_sites filespath
-    variable fetch_urls
+    upvar $urls fetch_urls
 
     if {[info exists patchfiles]} {
         foreach file $patchfiles {
@@ -357,9 +357,9 @@
 }
 
 # Checks dist files and their tags to assemble url lists for later fetching
-proc portfetch::checkdistfiles {args} {
+proc portfetch::checkdistfiles {urls} {
     global distfiles all_dist_files master_sites filespath
-    variable fetch_urls
+    upvar $urls fetch_urls
 
     if {[info exists distfiles]} {
         foreach file $distfiles {
@@ -378,9 +378,9 @@
 }
 
 # sorts fetch_urls in order of ping time
-proc portfetch::sortsites {args} {
+proc portfetch::sortsites {urls} {
     global fallback_mirror_site
-    variable fetch_urls
+    upvar $urls fetch_urls
 
     set fallback_mirror_list [mirror_sites $fallback_mirror_site {} {}]
 
@@ -454,12 +454,12 @@
 
 # Perform the full checksites/checkpatchfiles/checkdistfiles sequence.
 # This method is used by distcheck target.
-proc portfetch::checkfiles {args} {
-    variable fetch_urls
+proc portfetch::checkfiles {urls} {
+    upvar $urls fetch_urls
 
     checksites
-    checkpatchfiles
-    checkdistfiles
+    checkpatchfiles fetch_urls
+    checkdistfiles fetch_urls
 }
 
 
@@ -628,7 +628,7 @@
                 return -code error [format [msgcat::mc "%s must be writable"] $distpath]
             }
             if {!$sorted} {
-                sortsites
+                sortsites fetch_urls
                 set sorted yes
             }
             variable portfetch::$url_var
@@ -703,6 +703,7 @@
 proc portfetch::fetch_init {args} {
     global distfiles distname distpath all_dist_files dist_subdir fetch.type fetch_init_done
     global altprefix usealtworkpath
+    variable fetch_urls
 
     if {[info exists distpath] && [info exists dist_subdir] && ![info exists fetch_init_done]} {
 
@@ -717,7 +718,7 @@
         set distpath ${distpath}/${dist_subdir}
         set fetch_init_done yes
     }
-    portfetch::checkfiles
+    portfetch::checkfiles fetch_urls
 }
 
 proc portfetch::fetch_start {args} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090615/f50c44eb/attachment-0001.html>


More information about the macports-changes mailing list