[TIMOB-5085] Tooling: Disabling Spotlight causes iOS builder.py to hang on OSX Lion
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2011-09-09T12:26:53.000+0000 |
| Affected Version/s | Release 1.8.0 |
| Fix Version/s | Sprint 2011-35, Release 1.8.0 |
| Components | Tooling |
| Labels | n/a |
| Reporter | Marshall Culpepper |
| Assignee | Marshall Culpepper |
| Created | 2011-08-23T10:51:37.000+0000 |
| Updated | 2017-03-08T00:03:39.000+0000 |
Description
If you have the Spotlight indexer disabled, the iPhone builder.py will hang when it tries to use
mdfind to search for log files. Snippet of the builder.py output:
--- snip copying stuff ---
[DEBUG] executing command: /usr/bin/killall iPhone Simulator
[DEBUG] No matching processes belonging to you were found
[DEBUG] finding old log files
[DEBUG] executing command: mdfind -onlyin /Users/marshall/Library/Application Support/iPhone Simulator/4.3 -name .log
(HANG HERE)
To reproduce this, simply disable the Spotlight indexer, and try running any iPhone project:
$ sudo mdutil -a -i off
$ titanium run --platform=iphone
We can easily workaround this by checking the status of the Spotlight indexer with mdutil, and falling back to Python's os.walkdir or, simply use find:
$ mdutil -a -s
/:
Indexing disabled.
To test this fix, just disable spotlight indexing as listed above. Without the patch builder.py will hang for a _very_ long time. With the patch, builder.py will fall back to using recursive file search. Also try adding this property to a Titanium app:
Build the app, and you should just notice that it no longer uses mdfind in the debugging output.this has been merged
Closing ticket due to time passed.