This is an automated email from the ASF dual-hosted git repository. tvb pushed a commit to branch traveltissues/mr4 in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 03007e14efa710cd913c02b0bb177906e01a85f8 Author: Darius Makovsky <[email protected]> AuthorDate: Mon Dec 2 12:41:53 2019 +0000 element: Do not use deterministic times if sources support mtimes --- src/buildstream/element.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/buildstream/element.py b/src/buildstream/element.py index 595724f..f634537 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -1417,6 +1417,7 @@ class Element(Plugin): def _stage_sources_at(self, vdirectory, usebuildtree=False): context = self._get_context() + set_deterministic_mtimes = True # It's advantageous to have this temporary directory on # the same file system as the rest of our cache. @@ -1455,6 +1456,8 @@ class Element(Plugin): for source in self.__sources[last_required_previous_ix:]: source_dir = sourcecache.export(source) import_dir.import_files(source_dir) + if source.BST_STAGE_VIRTUAL_DIRECTORY: + set_deterministic_mtimes = False except SourceCacheError as e: raise ElementError("Error trying to export source for {}: {}".format(self.name, e)) @@ -1468,7 +1471,8 @@ class Element(Plugin): vdirectory.import_files(import_dir) # Ensure deterministic mtime of sources at build time - vdirectory.set_deterministic_mtime() + if set_deterministic_mtimes: + vdirectory.set_deterministic_mtime() # Ensure deterministic owners of sources at build time vdirectory.set_deterministic_user()
