[70269] trunk/base/src/registry2.0/registry.tcl

jmr at macports.org jmr at macports.org
Wed Aug 4 00:17:21 PDT 2010


Revision: 70269
          http://trac.macports.org/changeset/70269
Author:   jmr at 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]} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100804/d87f82f9/attachment.html>


More information about the macports-changes mailing list