summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-02-25 11:13:03 +0100
committerJürg Billeter <j@bitron.ch>2019-02-28 05:14:47 +0100
commita820883099839f50e4570f414a458a6f81948e2d (patch)
tree4605f057e1ed8275bf912adf43c80fefe83cd904
parentb1efd53ef21138ee5ce6b2d4d989f0f5ab723f69 (diff)
downloadbuildstream-a820883099839f50e4570f414a458a6f81948e2d.tar.gz
_artifactcache.py: Drop extract directory removal in remove()
Extract directories are no longer created.
-rw-r--r--buildstream/_artifactcache.py19
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():