summaryrefslogtreecommitdiff
path: root/src/buildstream/_basecache.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildstream/_basecache.py')
-rw-r--r--src/buildstream/_basecache.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buildstream/_basecache.py b/src/buildstream/_basecache.py
index 3654926a1..cec4dcd0d 100644
--- a/src/buildstream/_basecache.py
+++ b/src/buildstream/_basecache.py
@@ -263,6 +263,12 @@ class BaseCache():
return (any(remote.spec.push for remote in index_remotes) and
any(remote.spec.push for remote in storage_remotes))
+ def update_mtime(self, ref):
+ try:
+ os.utime(os.path.join(self.refdir, ref))
+ except FileNotFoundError as e:
+ raise self.spec_error("Couldn't find ref: {}".format(ref)) from e
+
################################################
# Local Private Methods #
################################################