[60377] trunk/base/src/macports1.0/macports.tcl
jmr at macports.org
jmr at macports.org
Tue Nov 10 04:58:11 PST 2009
Revision: 60377
http://trac.macports.org/changeset/60377
Author: jmr at macports.org
Date: 2009-11-10 04:58:08 -0800 (Tue, 10 Nov 2009)
Log Message:
-----------
don't fail due to permissions on the log dir when running commands like 'port lint' as non-root
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2009-11-10 12:41:54 UTC (rev 60376)
+++ trunk/base/src/macports1.0/macports.tcl 2009-11-10 12:58:08 UTC (rev 60377)
@@ -111,7 +111,12 @@
proc macports::init_logging {portname} {
global ::debuglog ::debuglogname macports::channels macports::portdbpath
- set logname [file join $macports::portdbpath "logs/$portname"]
+ set logspath [file join $macports::portdbpath logs]
+ if {![file writable $logspath]} {
+ ui_debug "logging disabled, can't write to $logspath"
+ return
+ }
+ set logname [file join $logspath $portname]
file mkdir $logname
set logname [file join $logname "main.log"]
ui_debug "logging to $logname"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091110/a5141916/attachment.html>
More information about the macports-changes
mailing list