Modified: trunk/base/src/port1.0/portmain.tcl (54715 => 54716)
--- trunk/base/src/port1.0/portmain.tcl 2009-07-31 22:58:03 UTC (rev 54715)
+++ trunk/base/src/port1.0/portmain.tcl 2009-07-31 23:03:57 UTC (rev 54716)
@@ -136,14 +136,8 @@
# or a shared directory owned by the group so use ~/.macports
if { $euid != 0 && ([info exists workpath] && [file exists $workpath] && ![file writable $workpath]) || [info exists portdbpath] && ![file writable [file join $portdbpath build]] } {
- set userid [getuid]
- set username [uid_to_name $userid]
+ set username [uid_to_name [getuid]]
- if { $userid !=0 } {
- ui_msg "MacPorts running without privileges.\
- You may be unable to complete certain actions (eg install)."
- }
-
# set global variable indicating to other functions to use ~/.macports as well
set usealtworkpath yes
Modified: trunk/base/src/port1.0/portutil.tcl (54715 => 54716)
--- trunk/base/src/port1.0/portutil.tcl 2009-07-31 22:58:03 UTC (rev 54715)
+++ trunk/base/src/port1.0/portutil.tcl 2009-07-31 23:03:57 UTC (rev 54716)
@@ -1503,6 +1503,12 @@
file mkdir $workpath
chownAsRoot $workpath
}
+
+ if { [getuid] != 0 } {
+ ui_msg "MacPorts running without privileges.\
+ You may be unable to complete certain actions (eg install)."
+ }
+
# de-escalate privileges if MacPorts was started with sudo
dropPrivileges