diff options
author | Jürg Billeter <j@bitron.ch> | 2018-10-17 17:08:44 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2018-10-22 17:05:41 +0000 |
commit | 12719f0db161358013f3995e2fe83385630c7c4e (patch) | |
tree | 0d21fc86013950db7da810ce5aa85d48af167d29 /buildstream/_artifactcache/artifactcache.py | |
parent | 43a2eee3f7b5fdb1e7284a934a7090ff0195e71a (diff) | |
download | buildstream-12719f0db161358013f3995e2fe83385630c7c4e.tar.gz |
_artifactcache: Rename update_atime() to update_mtime()
os.utime() updates both, however, list_artifacts() sorts refs by mtime,
i.e., atime is irrelevant.
Diffstat (limited to 'buildstream/_artifactcache/artifactcache.py')
-rw-r--r-- | buildstream/_artifactcache/artifactcache.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/buildstream/_artifactcache/artifactcache.py b/buildstream/_artifactcache/artifactcache.py index 7977691c0..c6c8afa80 100644 --- a/buildstream/_artifactcache/artifactcache.py +++ b/buildstream/_artifactcache/artifactcache.py @@ -228,7 +228,7 @@ class ArtifactCache(): self._required_elements.update(elements) # For the cache keys which were resolved so far, we bump - # the atime of them. + # the mtime of them. # # This is just in case we have concurrent instances of # BuildStream running with the same artifact cache, it will @@ -240,7 +240,7 @@ class ArtifactCache(): for key in (strong_key, weak_key): if key: try: - self.update_atime(key) + self.update_mtime(key) except ArtifactError: pass @@ -391,15 +391,15 @@ class ArtifactCache(): def preflight(self): pass - # update_atime() + # update_mtime() # - # Update the atime of an artifact. + # Update the mtime of an artifact. # # Args: # key (str): The key of the artifact. # - def update_atime(self, key): - raise ImplError("Cache '{kind}' does not implement contains()" + def update_mtime(self, key): + raise ImplError("Cache '{kind}' does not implement update_mtime()" .format(kind=type(self).__name__)) # initialize_remotes(): |