diff options
author | William Deegan <bill@baddogconsulting.com> | 2019-02-27 05:52:46 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2019-03-03 02:21:11 (GMT) |
commit | 9bbb976181f4cd5b6261993bae9fb5535bf07587 (patch) | |
tree | de73e3dc3545641f8a6f2a65eab20a9279adaae3 /src | |
parent | 3a3626cc08b3d27a90e65ccebb874e1082d9deca (diff) | |
download | SCons-9bbb976181f4cd5b6261993bae9fb5535bf07587.zip SCons-9bbb976181f4cd5b6261993bae9fb5535bf07587.tar.gz SCons-9bbb976181f4cd5b6261993bae9fb5535bf07587.tar.bz2 |
On windows first try with native file paths with \\ then swap path to normalized path string with / separators. On a fresh windows build the node string will have windows dirsep and not normalizd. This yielded broken builds for the Meta project'
Diffstat (limited to 'src')
-rw-r--r-- | src/engine/SCons/Node/FS.py | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index 77c340f..f2ba7be 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -3338,17 +3338,29 @@ class File(Base): # First try the simple name for node c_str = str(self) + df = dmap.get(c_str, None) + if df: + return df + if os.altsep: c_str = c_str.replace(os.sep, os.altsep) - df = dmap.get(c_str, None) + df = dmap.get(c_str, None) + if df: + return df + if not df: try: # this should yield a path which matches what's in the sconsign c_str = self.get_path() + df = dmap.get(c_str, None) + if df: + return df + if os.altsep: c_str = c_str.replace(os.sep, os.altsep) - - df = dmap.get(c_str, None) + df = dmap.get(c_str, None) + if df: + return df except AttributeError as e: raise FileBuildInfoFileToCsigMappingError("No mapping from file name to content signature for :%s"%c_str) @@ -3388,16 +3400,23 @@ class File(Base): dependency_map = self._build_dependency_map(bi) rebuilt = True - prev_ni = self._get_previous_signatures(dependency_map) + new_prev_ni = self._get_previous_signatures(dependency_map) + new = self.changed_timestamp_match(target, new_prev_ni) + old = self.changed_timestamp_match(target, prev_ni) + + if old != new: + print("Mismatch self.changed_timestamp_match(%s, prev_ni) old:%s new:%s"%(str(target), old, new)) + new_prev_ni = self._get_previous_signatures(dependency_map) + - if not self.changed_timestamp_match(target, prev_ni): + if not new: try: # NOTE: We're modifying the current node's csig in a query. - self.get_ninfo().csig = prev_ni.csig + self.get_ninfo().csig = new_prev_ni.csig except AttributeError: pass return False - return self.changed_content(target, prev_ni) + return self.changed_content(target, new_prev_ni) def changed_timestamp_newer(self, target, prev_ni): try: |