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

jmr at macports.org jmr at macports.org
Sat Jun 6 04:50:54 PDT 2009


Revision: 51919
          http://trac.macports.org/changeset/51919
Author:   jmr at macports.org
Date:     2009-06-06 04:50:53 -0700 (Sat, 06 Jun 2009)
Log Message:
-----------
remove broken code that tries to re-execute the command with sudo on permission errors

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

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2009-06-06 11:00:02 UTC (rev 51918)
+++ trunk/base/src/port/port.tcl	2009-06-06 11:50:53 UTC (rev 51919)
@@ -2103,16 +2103,6 @@
         if { [catch {portuninstall::uninstall $portname [composite_version $portversion [array get variations]] [array get options]} result] } {
             global errorInfo
             ui_debug "$errorInfo"
-
-            # start gsoc08-privileges
-            if { [string first "permission denied" $result] != -1 } {
-                set result "port requires root privileges for this action and needs you to execute 'sudo port uninstall $portname' to continue."
-                #ui_msg [exec sudo port uninstall $portname]
-                # The above line is what should be here to let the user simply enter his/her password to uninstall as root.
-                # However, for some as yet unknown reason, executing it here will not work.
-            }
-            # end gsoc08-privileges
-
             break_softcontinue "port uninstall failed: $result" 1 status
         }
     }
@@ -2885,25 +2875,6 @@
 
         mportclose $workername
         
-        # start gsoc08-privileges
-        if { [geteuid] != 0 && $result == 2} {
-            # mportexec will return an error result code 2 if eval_targets fails due to insufficient privileges.
-
-            set portbinary "${macports::prefix}/bin/port"
-
-            ui_info "Attempting port action with 'sudo port': 'sudo $portbinary $target $portname'."
-            set result 0
-            if {[catch {set sudomsgs [exec sudo $portbinary $target $portname]} sudomsgs]} {
-                global errorInfo
-                ui_debug "$errorInfo"
-                break_softcontinue "Unable to execute port: $errorInfo" 1 status
-            }
-
-            ui_msg $sudomsgs
-            ui_debug "'sudo $portbinary $target $portname' has completed."
-        }
-        # end gsoc08-privileges
-        
         # Process any error that wasn't thrown and handled already
         if {$result} {
             break_softcontinue "Status $result encountered during processing." 1 status
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090606/c04c15a7/attachment.html>


More information about the macports-changes mailing list