[113023] trunk/base/src/port1.0/portutil.tcl

cal at macports.org cal at macports.org
Wed Nov 6 17:30:21 PST 2013


Revision: 113023
          https://trac.macports.org/changeset/113023
Author:   cal at macports.org
Date:     2013-11-06 17:30:21 -0800 (Wed, 06 Nov 2013)
Log Message:
-----------
portutil.tcl: disable trace mode fence for deactivation, move postrun after the trace mode sandbox is disabled

Having the trace mode fence enabled for deactivation might break deactivation
hooks that run cache-update scripts they do not declare a dependency on.

Moving postrun after the trace sandbox has been disabled copies the prerun
step, where trace mode is also disabled.

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

Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl	2013-11-07 01:25:13 UTC (rev 113022)
+++ trunk/base/src/port1.0/portutil.tcl	2013-11-07 01:30:21 UTC (rev 113023)
@@ -1408,6 +1408,7 @@
                     # Enable the fence to prevent any creation/modification
                     # outside the sandbox.
                     if {$target ne "activate"
+                      && $target ne "deactivate"
                       && $target ne "archive"
                       && $target ne "install"} {
                         porttrace::trace_enable_fence
@@ -1508,15 +1509,6 @@
                         if {$result != 0} { break }
                     }
                 }
-                # Execute post-run procedure
-                if {[ditem_contains $ditem postrun] && $result == 0} {
-                    set postrun [ditem_key $ditem postrun]
-                    ui_debug "Executing $postrun"
-                    set result [catch {eval $postrun $targetname} errstr]
-                    # Save variables in order to re-throw the same error code.
-                    set errcode $::errorCode
-                    set errinfo $::errorInfo
-                }
 
                 # Check dependencies & file creations outside workpath.
                 if {[info exists ports_trace]
@@ -1531,6 +1523,17 @@
                     # End of trace.
                     porttrace::trace_stop
                 }
+
+                # Execute post-run procedure
+                if {[ditem_contains $ditem postrun] && $result == 0} {
+                    set postrun [ditem_key $ditem postrun]
+                    ui_debug "Executing $postrun"
+                    set result [catch {eval $postrun $targetname} errstr]
+                    # Save variables in order to re-throw the same error code.
+                    set errcode $::errorCode
+                    set errinfo $::errorInfo
+                }
+
                 # $oldpwd is deleted while uninstalling a port, changing back
                 # _will_ fail
                 catch {_cd $oldpwd}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131106/54f95cfe/attachment-0001.html>


More information about the macports-changes mailing list