diff options
author | Darius Makovsky <traveltissues@protonmail.com> | 2019-12-30 09:42:02 +0000 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2020-02-11 21:08:59 +0100 |
commit | 702fbd3e8813a4267bb4c1ffcf90b1729c95daef (patch) | |
tree | 2cf8e39be350a8a007aa013ce2d040aec0361f51 | |
parent | 6fd63ac7e6a4de89e6872109e9ea81ffc5753e3f (diff) | |
download | buildstream-702fbd3e8813a4267bb4c1ffcf90b1729c95daef.tar.gz |
_artifact: Import workspaced artifacts with mtimes
-rw-r--r-- | src/buildstream/_artifact.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/buildstream/_artifact.py b/src/buildstream/_artifact.py index c405f1e15..a9cd56c2a 100644 --- a/src/buildstream/_artifact.py +++ b/src/buildstream/_artifact.py @@ -165,11 +165,12 @@ class Artifact: artifact.weak_key = self._weak_cache_key artifact.was_workspaced = bool(element._get_workspace()) + properties = ["MTime"] if artifact.was_workspaced else [] # Store files if collectvdir: filesvdir = CasBasedDirectory(cas_cache=self._cas) - filesvdir.import_files(collectvdir) + filesvdir.import_files(collectvdir, properties=properties) artifact.files.CopyFrom(filesvdir._get_digest()) size += filesvdir.get_size() @@ -201,7 +202,7 @@ class Artifact: # Store build tree if sandbox_build_dir: buildtreevdir = CasBasedDirectory(cas_cache=self._cas) - buildtreevdir.import_files(sandbox_build_dir) + buildtreevdir.import_files(sandbox_build_dir, properties=properties) artifact.buildtree.CopyFrom(buildtreevdir._get_digest()) size += buildtreevdir.get_size() |