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

jmr at macports.org jmr at macports.org
Wed Jan 14 21:32:50 PST 2015


Revision: 131612
          https://trac.macports.org/changeset/131612
Author:   jmr at macports.org
Date:     2015-01-14 21:32:49 -0800 (Wed, 14 Jan 2015)
Log Message:
-----------
don't skip the uninstall target entirely in dry-run mode, it has its own dry-run checks and provides information about which dependencies or dependents would be uninstalled

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

Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl	2015-01-15 04:08:43 UTC (rev 131611)
+++ trunk/base/src/port1.0/portutil.tcl	2015-01-15 05:32:49 UTC (rev 131612)
@@ -1363,6 +1363,8 @@
     set savedhome [file join $portdbpath home]
     set env(HOME) "${workpath}/.home"
     set env(TMPDIR) "${workpath}/.tmp"
+    # targets to run even in dry-run mode (these should have their own dry-run checks)
+    set dryrun_allow_targets {org.macports.uninstall}
 
     if {[ditem_key $ditem state] ne "no"} {
         set target_state_fd [open_statefile]
@@ -1394,7 +1396,7 @@
             }
 
             # Of course, if this is a dry run, don't do the task:
-            if {[info exists ports_dryrun] && $ports_dryrun eq "yes"} {
+            if {[info exists ports_dryrun] && $ports_dryrun eq "yes" && [lsearch -exact $dryrun_allow_targets $targetname] == -1} {
                 # only one message per portname
                 if {$portname != $ports_dry_last_skipped} {
                     ui_notice "For $portname: skipping $targetname (dry run)"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150114/f592b638/attachment-0001.html>


More information about the macports-changes mailing list