Revision: 70269 http://trac.macports.org/changeset/70269 Author: jmr@macports.org Date: 2010-08-04 00:17:19 -0700 (Wed, 04 Aug 2010) Log Message: ----------- skip locking when registry dir is unwritable Modified Paths: -------------- trunk/base/src/registry2.0/registry.tcl Modified: trunk/base/src/registry2.0/registry.tcl =================================================================== --- trunk/base/src/registry2.0/registry.tcl 2010-08-04 06:51:39 UTC (rev 70268) +++ trunk/base/src/registry2.0/registry.tcl 2010-08-04 07:17:19 UTC (rev 70269) @@ -401,6 +401,10 @@ } set lockpath [file join ${registry.path} registry .registry.lock] if {![info exists lockfd]} { + if {![file writable [file dirname $lockpath]]} { + # skip locking, registry can't be modified anyway + return + } set lockfd [::open $lockpath w] } if {[catch {flock $lockfd -exclusive -noblock} result]} {