[138521] trunk/base/src

jmr at macports.org jmr at macports.org
Fri Jul 10 16:40:34 PDT 2015


Revision: 138521
          https://trac.macports.org/changeset/138521
Author:   jmr at macports.org
Date:     2015-07-10 16:40:34 -0700 (Fri, 10 Jul 2015)
Log Message:
-----------
allow dry-run of uninstall without requiring sufficient privileges to write to $prefix

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

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2015-07-10 21:27:34 UTC (rev 138520)
+++ trunk/base/src/port/port.tcl	2015-07-10 23:40:34 UTC (rev 138521)
@@ -3166,7 +3166,7 @@
             return 1
         }
     }
-    if {[prefix_unwritable]} {
+    if {[prefix_unwritable] && ![macports::global_option_isset ports_dryrun]} {
         return 1
     }
 

Modified: trunk/base/src/port1.0/portuninstall.tcl
===================================================================
--- trunk/base/src/port1.0/portuninstall.tcl	2015-07-10 21:27:34 UTC (rev 138520)
+++ trunk/base/src/port1.0/portuninstall.tcl	2015-07-10 23:40:34 UTC (rev 138521)
@@ -49,8 +49,8 @@
 default uninstall.asroot no
 
 proc portuninstall::uninstall_start {args} {
-    global prefix
-    if {![file writable $prefix] || ([getuid] == 0 && [geteuid] != 0)} {
+    global prefix ports_dryrun
+    if {(![file writable $prefix] && ![tbool ports_dryrun]) || ([getuid] == 0 && [geteuid] != 0)} {
         # if install location is not writable, need root privileges
         elevateToRoot "uninstall"
     }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150710/a7590241/attachment.html>


More information about the macports-changes mailing list