diff options
author | Jürg Billeter <j@bitron.ch> | 2019-02-25 11:13:03 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-02-28 12:12:38 +0100 |
commit | 3fc9e559a3198e350428bb1f9a8eb37b3263bf5d (patch) | |
tree | efff81d0767776462ca0ff081eb3796ccf54b966 | |
parent | 99b76bd922e44ac53dcecda64af390dc5872c5a7 (diff) | |
download | buildstream-3fc9e559a3198e350428bb1f9a8eb37b3263bf5d.tar.gz |
_artifactcache.py: Drop extract directory removal in remove()
Extract directories are no longer created.
-rw-r--r-- | buildstream/_artifactcache.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/buildstream/_artifactcache.py b/buildstream/_artifactcache.py index 3cdf49869..4ed4fb3f9 100644 --- a/buildstream/_artifactcache.py +++ b/buildstream/_artifactcache.py @@ -423,25 +423,6 @@ class ArtifactCache(): # (int): The amount of space recovered in the cache, in bytes # def remove(self, ref): - - # Remove extract if not used by other ref - tree = self.cas.resolve_ref(ref) - ref_name, ref_hash = os.path.split(ref) - extract = os.path.join(self.extractdir, ref_name, tree.hash) - keys_file = os.path.join(extract, 'meta', 'keys.yaml') - if os.path.exists(keys_file): - keys_meta = _yaml.load(keys_file) - keys = [keys_meta['strong'], keys_meta['weak']] - remove_extract = True - for other_hash in keys: - if other_hash == ref_hash: - continue - remove_extract = False - break - - if remove_extract: - utils._force_rmtree(extract) - return self.cas.remove(ref) # get_artifact_directory(): |