[68873] branches/release_1_9/base/src/macports1.0/macports.tcl

jmr at macports.org jmr at macports.org
Wed Jun 16 09:12:45 PDT 2010


Revision: 68873
          http://trac.macports.org/changeset/68873
Author:   jmr at macports.org
Date:     2010-06-16 09:12:44 -0700 (Wed, 16 Jun 2010)
Log Message:
-----------
merge r68872 from trunk:
 bring back deactivation of replaced ports during upgrade (#25270)

Revision Links:
--------------
    http://trac.macports.org/changeset/68872

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

Modified: branches/release_1_9/base/src/macports1.0/macports.tcl
===================================================================
--- branches/release_1_9/base/src/macports1.0/macports.tcl	2010-06-16 16:08:57 UTC (rev 68872)
+++ branches/release_1_9/base/src/macports1.0/macports.tcl	2010-06-16 16:12:44 UTC (rev 68873)
@@ -3196,6 +3196,26 @@
                 set anyactive no
             }
         }
+        if {$anyactive && $portname != $newname} {
+            # replaced_by in effect, deactivate the old port
+            # we have to force the deactivate in case of dependents
+            set force_cur [info exists options(ports_force)]
+            set options(ports_force) yes
+            if {$is_dryrun eq "yes"} {
+                ui_msg "Skipping deactivate $portname @${version_active}_${revision_active}${variant_active} (dry run)"
+            } elseif {!(${registry.format} == "receipt_sqlite" && [registry::run_target $regref deactivate [array get options]])
+                      && [catch {portimage::deactivate $portname ${version_active}_${revision_active}${variant_active} [array get options]} result]} {
+                global errorInfo
+                ui_debug "$errorInfo"
+                ui_error "Deactivating $portname @${version_active}_${revision_active}${variant_active} failed: $result"
+                catch {mportclose $workername}
+                return 1
+            }
+            if {!$force_cur} {
+                unset options(ports_force)
+            }
+            set anyactive no
+        }
         if {[info exists options(port_uninstall_old)]} {
             # uninstalling now could fail due to dependents when not forced,
             # because the new version is not installed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100616/ec6cd55e/attachment-0001.html>


More information about the macports-changes mailing list