[113649] trunk/base/src/macports1.0/macports.tcl
cal at macports.org
cal at macports.org
Thu Nov 21 14:15:53 PST 2013
Revision: 113649
https://trac.macports.org/changeset/113649
Author: cal at macports.org
Date: 2013-11-21 14:15:53 -0800 (Thu, 21 Nov 2013)
Log Message:
-----------
macports1.0: Avoid spotlight indexing in $portdbpath
Marking $portdbpath as hidden will prevent Spotlight from indexing builds while
they are running.
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2013-11-21 21:54:01 UTC (rev 113648)
+++ trunk/base/src/macports1.0/macports.tcl 2013-11-21 22:15:53 UTC (rev 113649)
@@ -762,6 +762,14 @@
return -code error "$portdbpath is not a directory. Please create the directory $portdbpath and try again"
}
}
+ # set the hidden flag on $portdbpath to avoid spotlight indexing, which
+ # might slow builds down considerably. You can avoid this by touching
+ # $portdbpath/.nohide.
+ if {![file exists [file join $portdbpath .nohide]] && [file writable $portdbpath] && [file attributes $portdbpath -hidden] == 0} {
+ if {[catch {file attributes $portdbpath -hidden yes} result]} {
+ ui_debug "error setting hidden flag for $portdbpath: $result"
+ }
+ }
set env(HOME) [file join $portdbpath home]
set registry.path $portdbpath
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131121/4e7d4042/attachment.html>
More information about the macports-changes
mailing list