[52113] trunk/base/src/port/port.tcl

jmr at macports.org jmr at macports.org
Wed Jun 10 03:00:34 PDT 2009


Revision: 52113
          http://trac.macports.org/changeset/52113
Author:   jmr at macports.org
Date:     2009-06-10 03:00:33 -0700 (Wed, 10 Jun 2009)
Log Message:
-----------
make action_activate and action_deactivate respect the dryrun option (#19908)

Modified Paths:
--------------
    trunk/base/src/port/port.tcl

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2009-06-10 06:53:32 UTC (rev 52112)
+++ trunk/base/src/port/port.tcl	2009-06-10 10:00:33 UTC (rev 52113)
@@ -1833,10 +1833,14 @@
         return 1
     }
     foreachport $portlist {
-        if { [catch {portimage::activate $portname [composite_version $portversion [array get variations]] [array get options]} result] } {
-            global errorInfo
-            ui_debug "$errorInfo"
-            break_softcontinue "port activate failed: $result" 1 status
+        if {![macports::global_option_isset ports_dryrun]} {
+            if { [catch {portimage::activate $portname [composite_version $portversion [array get variations]] [array get options]} result] } {
+                global errorInfo
+                ui_debug "$errorInfo"
+                break_softcontinue "port activate failed: $result" 1 status
+            }
+        } else {
+            ui_msg "Skipping activate $portname (dry run)"
         }
     }
     
@@ -1850,10 +1854,14 @@
         return 1
     }
     foreachport $portlist {
-        if { [catch {portimage::deactivate $portname [composite_version $portversion [array get variations]] [array get options]} result] } {
-            global errorInfo
-            ui_debug "$errorInfo"
-            break_softcontinue "port deactivate failed: $result" 1 status
+        if {![macports::global_option_isset ports_dryrun]} {
+            if { [catch {portimage::deactivate $portname [composite_version $portversion [array get variations]] [array get options]} result] } {
+                global errorInfo
+                ui_debug "$errorInfo"
+                break_softcontinue "port deactivate failed: $result" 1 status
+            }
+        } else {
+            ui_msg "Skipping deactivate $portname (dry run)"
         }
     }
     
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090610/c4a46b6e/attachment.html>


More information about the macports-changes mailing list