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

jmr at macports.org jmr at macports.org
Thu Mar 11 07:04:02 PST 2010


Revision: 64628
          http://trac.macports.org/changeset/64628
Author:   jmr at macports.org
Date:     2010-03-11 07:04:00 -0800 (Thu, 11 Mar 2010)
Log Message:
-----------
upgrade dependents before uninstalling old versions

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-03-11 15:00:37 UTC (rev 64627)
+++ trunk/base/src/macports1.0/macports.tcl	2010-03-11 15:04:00 UTC (rev 64628)
@@ -2895,30 +2895,6 @@
         return 1
     }
 
-    if {[info exists uninstall_later] && $uninstall_later == yes} {
-        foreach i $ilist {
-            set version [lindex $i 1]
-            set revision [lindex $i 2]
-            set variant [lindex $i 3]
-            if {$version == $version_in_tree && $revision == $revision_in_tree && $variant == $portinfo(canonical_active_variants) && $portname == $newname} {
-                continue
-            }
-            ui_debug "Uninstalling $portname ${version}_${revision}${variant}"
-            if {$is_dryrun eq "yes"} {
-                ui_msg "Skipping uninstall $portname @${version}_${revision}${variant} (dry run)"
-            } elseif {[catch {portuninstall::uninstall $portname ${version}_${revision}${variant} $optionslist} result]} {
-                global errorInfo
-                ui_debug "$errorInfo"
-                # replaced_by can mean that we try to uninstall all versions of the old port, so handle errors due to dependents
-                if {$result != "Please uninstall the ports that depend on $portname first." && ![ui_isset ports_processall]} {
-                    ui_error "Uninstall $portname @${version}_${revision}${variant} failed: $result"
-                    catch {mportclose $workername}
-                    return 1
-                }
-            }
-        }
-    }
-
     # Check if we have to do dependents
     if {[info exists options(ports_do_dependents)]} {
         # We do dependents ..
@@ -2950,6 +2926,29 @@
         }
     }
 
+    if {[info exists uninstall_later] && $uninstall_later == yes} {
+        foreach i $ilist {
+            set version [lindex $i 1]
+            set revision [lindex $i 2]
+            set variant [lindex $i 3]
+            if {$version == $version_in_tree && $revision == $revision_in_tree && $variant == $portinfo(canonical_active_variants) && $portname == $newname} {
+                continue
+            }
+            ui_debug "Uninstalling $portname ${version}_${revision}${variant}"
+            if {$is_dryrun eq "yes"} {
+                ui_msg "Skipping uninstall $portname @${version}_${revision}${variant} (dry run)"
+            } elseif {[catch {portuninstall::uninstall $portname ${version}_${revision}${variant} $optionslist} result]} {
+                global errorInfo
+                ui_debug "$errorInfo"
+                # replaced_by can mean that we try to uninstall all versions of the old port, so handle errors due to dependents
+                if {$result != "Please uninstall the ports that depend on $portname first." && ![ui_isset ports_processall]} {
+                    ui_error "Uninstall $portname @${version}_${revision}${variant} failed: $result"
+                    catch {mportclose $workername}
+                    return 1
+                }
+            }
+        }
+    }
 
     # close the port handle
     mportclose $workername
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100311/4f0b5b96/attachment.html>


More information about the macports-changes mailing list