[73133] trunk/base/src/macports1.0/macports.tcl

jmr at macports.org jmr at macports.org
Thu Nov 4 23:50:59 PDT 2010


Revision: 73133
          http://trac.macports.org/changeset/73133
Author:   jmr at macports.org
Date:     2010-11-04 23:50:56 -0700 (Thu, 04 Nov 2010)
Log Message:
-----------
skip depspecs that have previously been seen in mportdepends

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports.tcl

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2010-11-05 06:46:52 UTC (rev 73132)
+++ trunk/base/src/macports1.0/macports.tcl	2010-11-05 06:50:56 UTC (rev 73133)
@@ -2439,10 +2439,15 @@
 #                  dependencies ports.
 # accDeps -> accumulator for recursive calls
 # return 0 if everything was ok, an non zero integer otherwise.
-proc mportdepends {mport {target ""} {recurseDeps 1} {skipSatisfied 1}} {
+proc mportdepends {mport {target ""} {recurseDeps 1} {skipSatisfied 1} {accDeps 0}} {
 
     array set portinfo [mportinfo $mport]
     set deptypes {}
+    if {$accDeps} {
+        upvar depspec_seen depspec_seen
+    } else {
+        array set depspec_seen {}
+    }
 
     # progress indicator
     if {![macports::ui_isset ports_debug]} {
@@ -2484,6 +2489,13 @@
             continue
         }
         foreach depspec $portinfo($deptype) {
+            # skip depspecs we've already seen
+            if {[info exists depspec_seen($depspec)]} {
+                continue
+            } else {
+                set depspec_seen($depspec) 1
+            }
+            
             # Is that dependency satisfied or this port installed?
             # If we don't skip or if it is not, add it to the list.
             set present [_mportispresent $mport $depspec]
@@ -2578,7 +2590,7 @@
     if {$recurseDeps} {
         foreach subport $subPorts {
             # Sub ports should be installed (all dependencies must be satisfied).
-            set res [mportdepends $subport "" $recurseDeps $skipSatisfied]
+            set res [mportdepends $subport "" $recurseDeps $skipSatisfied 1]
             if {$res != 0} {
                 return $res
             }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101104/ccec5e0e/attachment.html>


More information about the macports-changes mailing list