Changes by: Aleksey Nogin (nogin at metaprl.org)
Date: 2007-04-12 11:16:46 -0700 (Thu, 12 Apr 2007)
Revision: 10411
Log message:
[Bug 657] When creating node and directory values on a Unix OS, try figuring
out whether the parent directory is on a case-insensitive filesystem.
The current implementation (not fully tested yet) works as follows:
- It keeps a memo table of previous tests (table is persistent at run-time,
but not across runs)
- The current test for a directory is to:
- Find an item inside it that has a letter in its name
- Create an alternate-case name
- Compree the stat values of the two
- It does: "lstat existing; lstat alternate; lstat existing" to detect
cases where the file is being changed in parallel. Only when both the
first and the last stats were successful and provided an identical
answer, the test is considered successful.
- The sequence for finding a item that can be tested
- First try the one for which the dir/node value is being created
- Next try reading the directory
- Next try creating a tmp file in that directory
- If nothing worked (this would happen if the directory does not exist or is
inaccessible), test its parent instead. If the root dir is untestable,
consider it to be case sensitive.
Good: The overhead does not seem too bad (within 5% for no-op rebuilds)
Bad: This will not handle cases, where the "case sensitivity" changes while
OMake is running. For example, if a new filesystem is mounted on top of
a one with the opposite case sensitivity, OMake will get confused.
Changes | Path |
+161 -54 | omake-branches/0.9.8.x/src/ir/omake_node.ml |