[52770] trunk/base/src/port1.0/portdistcheck.tcl

raimue at macports.org raimue at macports.org
Mon Jun 22 18:21:44 PDT 2009


Revision: 52770
          http://trac.macports.org/changeset/52770
Author:   raimue at macports.org
Date:     2009-06-22 18:21:44 -0700 (Mon, 22 Jun 2009)
Log Message:
-----------
port1.0/portdistcheck.tcl:
Fixing distcheck by using the urlmap from portfetch. That means it is still
highly coupled to portfetch.

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

Modified: trunk/base/src/port1.0/portdistcheck.tcl
===================================================================
--- trunk/base/src/port1.0/portdistcheck.tcl	2009-06-23 01:16:51 UTC (rev 52769)
+++ trunk/base/src/port1.0/portdistcheck.tcl	2009-06-23 01:21:44 UTC (rev 52770)
@@ -64,21 +64,20 @@
     if {"${distcheck.check}" != "none"
         && "${fetch.type}" == "standard"} {
         # portfetch 1.0::checkfiles sets fetch_urls list.
-        global fetch_urls
-        checkfiles
+        set fetch_urls {}
+        portfetch::checkfiles fetch_urls
         set totalsize 0
 
         # Check all the files.
         foreach {url_var distfile} $fetch_urls {
-            global portfetch::$url_var
-            if {![info exists $url_var]} {
+            global portfetch::urlmap
+            if {![info exists urlmap($url_var)]} {
                 ui_error [format [msgcat::mc "No defined site for tag: %s, using master_sites"] $url_var]
-                set url_var master_sites
-                global portfetch::$url_var
+                set urlmap($url_var) $master_sites
             }
             if {${distcheck.check} == "moddate"} {
                 set count 0
-                foreach site [set $url_var] {
+                foreach site $urlmap($url_var) {
                     ui_debug [format [msgcat::mc "Checking %s from %s"] $distfile $site]
                     set file_url [portfetch::assemble_url $site $distfile]
                     if {[catch {set urlnewer [curl isnewer $file_url $port_moddate]} error]} {
@@ -95,7 +94,7 @@
                 }
             } elseif {${distcheck.check} == "filesize"} {
                 set count 0
-                foreach site [set $url_var] {
+                foreach site $urlmap($url_var) {
                     ui_debug [format [msgcat::mc "Checking %s from %s"] $distfile $site]
                     set file_url [portfetch::assemble_url $site $distfile]
                     if {[catch {set urlsize [curl getsize $file_url]} error]} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090622/b9a64d36/attachment-0001.html>


More information about the macports-changes mailing list