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

jmr at macports.org jmr at macports.org
Fri Mar 6 15:54:29 PST 2009


Revision: 47807
          http://trac.macports.org/changeset/47807
Author:   jmr at macports.org
Date:     2009-03-06 15:54:28 -0800 (Fri, 06 Mar 2009)
Log Message:
-----------
upgrade: handle -R correctly in all cases

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

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2009-03-06 23:39:48 UTC (rev 47806)
+++ trunk/base/src/macports1.0/macports.tcl	2009-03-06 23:54:28 UTC (rev 47807)
@@ -2405,24 +2405,7 @@
     if {$nodeps == "yes"} {
         ui_debug "Not following dependencies"
     } else {
-        # If we're following dependents, we only want to follow this port's
-        # dependents, not those of all its dependencies. Otherwise, we would
-        # end up processing this port's dependents n+1 times (recursively!),
-        # where n is the number of dependencies this port has, since this port
-        # is of course a dependent of each of its dependencies. Plus the
-        # dependencies could have any number of unrelated dependents.
-        
-        # So we save whether we're following dependents, unset the option
-        # while doing the dependencies, and restore it afterwards.
-        set saved_do_dependents [info exists options(ports_do_dependents)]
-        unset -nocomplain options(ports_do_dependents)
-        
         _upgrade_dependencies portinfo depscache globalvarlist variationslist options
-        
-        # restore dependent-following to its former value
-        if {$saved_do_dependents} {
-            set options(ports_do_dependents) yes
-        }
     }
 
     # check installed version against version in ports
@@ -2596,6 +2579,18 @@
           $globalvarlistname globalvarlist $variationslistname variationslist \
           $optionsname options
     
+    # If we're following dependents, we only want to follow this port's
+    # dependents, not those of all its dependencies. Otherwise, we would
+    # end up processing this port's dependents n+1 times (recursively!),
+    # where n is the number of dependencies this port has, since this port
+    # is of course a dependent of each of its dependencies. Plus the
+    # dependencies could have any number of unrelated dependents.
+        
+    # So we save whether we're following dependents, unset the option
+    # while doing the dependencies, and restore it afterwards.
+    set saved_do_dependents [info exists options(ports_do_dependents)]
+    unset -nocomplain options(ports_do_dependents)
+    
     # each dep type is upgraded
     foreach dtype {depends_build depends_lib depends_run} {
         if {[info exists portinfo($dtype)]} {
@@ -2607,6 +2602,10 @@
             }
         }
     }
+    # restore dependent-following to its former value
+    if {$saved_do_dependents} {
+        set options(ports_do_dependents) yes
+    }
 }
 
 # mportselect
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090306/0c316c40/attachment-0001.html>


More information about the macports-changes mailing list