From 702fbd3e8813a4267bb4c1ffcf90b1729c95daef Mon Sep 17 00:00:00 2001 From: Darius Makovsky Date: Mon, 30 Dec 2019 09:42:02 +0000 Subject: _artifact: Import workspaced artifacts with mtimes --- src/buildstream/_artifact.py | 5 +++-- 1 file 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() -- cgit v1.2.1