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

cal at macports.org cal at macports.org
Thu Aug 15 12:34:56 PDT 2013


Revision: 109452
          https://trac.macports.org/changeset/109452
Author:   cal at macports.org
Date:     2013-08-15 12:34:55 -0700 (Thu, 15 Aug 2013)
Log Message:
-----------
portutil: use eval to get a nicer backtrace on error

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-08-15 18:55:31 UTC (rev 109451)
+++ trunk/base/src/port1.0/portutil.tcl	2013-08-15 19:34:55 UTC (rev 109452)
@@ -1448,7 +1448,7 @@
                 if {$result == 0} {
                     foreach pre [ditem_key $ditem pre] {
                         ui_debug "Executing $pre"
-                        set result [catch {$pre $targetname} errstr]
+                        set result [catch {eval $pre $targetname} errstr]
                         # Save variables in order to re-throw the same error code.
                         set errcode $::errorCode
                         set errinfo $::errorInfo
@@ -1458,7 +1458,7 @@
 
                 if {$result == 0} {
                     ui_debug "Executing $targetname ($portname)"
-                    set result [catch {$procedure $targetname} errstr]
+                    set result [catch {eval $procedure $targetname} errstr]
                     # Save variables in order to re-throw the same error code.
                     set errcode $::errorCode
                     set errinfo $::errorInfo
@@ -1467,7 +1467,7 @@
                 if {$result == 0} {
                     foreach post [ditem_key $ditem post] {
                         ui_debug "Executing $post"
-                        set result [catch {$post $targetname} errstr]
+                        set result [catch {eval $post $targetname} errstr]
                         # Save variables in order to re-throw the same error code.
                         set errcode $::errorCode
                         set errinfo $::errorInfo
@@ -1478,7 +1478,7 @@
                 if {[ditem_contains $ditem postrun] && $result == 0} {
                     set postrun [ditem_key $ditem postrun]
                     ui_debug "Executing $postrun"
-                    set result [catch {$postrun $targetname} errstr]
+                    set result [catch {eval $postrun $targetname} errstr]
                     # Save variables in order to re-throw the same error code.
                     set errcode $::errorCode
                     set errinfo $::errorInfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130815/24c45168/attachment.html>


More information about the macports-changes mailing list