summaryrefslogtreecommitdiff
path: root/buildstream/storage
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/storage')
-rw-r--r--buildstream/storage/_filebaseddirectory.py4
-rw-r--r--buildstream/storage/directory.py10
2 files changed, 14 insertions, 0 deletions
diff --git a/buildstream/storage/_filebaseddirectory.py b/buildstream/storage/_filebaseddirectory.py
index 17144bc5f..8956d303a 100644
--- a/buildstream/storage/_filebaseddirectory.py
+++ b/buildstream/storage/_filebaseddirectory.py
@@ -121,8 +121,12 @@ class FileBasedDirectory(Directory):
for f in import_result.files_written:
os.utime(os.path.join(self.external_directory, f), times=(cur_time, cur_time))
+ self._mark_changed()
return import_result
+ def _mark_changed(self):
+ self._directory_read = False
+
def set_deterministic_mtime(self):
_set_deterministic_mtime(self.external_directory)
diff --git a/buildstream/storage/directory.py b/buildstream/storage/directory.py
index 984a7f0dd..838741231 100644
--- a/buildstream/storage/directory.py
+++ b/buildstream/storage/directory.py
@@ -166,3 +166,13 @@ class Directory():
"""
raise NotImplementedError()
+
+ def _mark_changed(self):
+ """Internal function to mark this directory as having been changed
+ outside this API. This normally can only happen by calling the
+ Sandbox's `run` method. This does *not* mark everything as modified
+ (i.e. list_modified_paths will not necessarily return the same results
+ as list_relative_paths after calling this.)
+
+ """
+ raise NotImplementedError()