summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-02-25 10:11:16 +0100
committerJürg Billeter <j@bitron.ch>2019-02-28 05:14:47 +0100
commit0f4e9eb64fd7d1b9a564a495ea066ec60679b996 (patch)
tree4e7e628b9975b225b310d024b0d082f767b01c96
parent06a84bfea5dc55ed358281f7433d579cdf6d9aa2 (diff)
downloadbuildstream-0f4e9eb64fd7d1b9a564a495ea066ec60679b996.tar.gz
_artifactcache.py: Remove unused extract() method
-rw-r--r--buildstream/_artifactcache.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/buildstream/_artifactcache.py b/buildstream/_artifactcache.py
index e29379dad..3cdf49869 100644
--- a/buildstream/_artifactcache.py
+++ b/buildstream/_artifactcache.py
@@ -465,31 +465,6 @@ class ArtifactCache():
digest = self.cas.resolve_ref(ref, update_mtime=True)
return CasBasedDirectory(self.cas, digest)
- # extract():
- #
- # Extract cached artifact for the specified Element if it hasn't
- # already been extracted.
- #
- # Assumes artifact has previously been fetched or committed.
- #
- # Args:
- # element (Element): The Element to extract
- # key (str): The cache key to use
- # subdir (str): Optional specific subdir to extract
- #
- # Raises:
- # ArtifactError: In cases there was an OSError, or if the artifact
- # did not exist.
- #
- # Returns: path to extracted artifact
- #
- def extract(self, element, key, subdir=None):
- ref = element.get_artifact_name(key)
-
- path = os.path.join(self.extractdir, element._get_project().name, element.normal_name)
-
- return self.cas.extract(ref, path, subdir=subdir)
-
# commit():
#
# Commit built artifact to cache.
@@ -630,11 +605,6 @@ class ArtifactCache():
if self.cas.pull(ref, remote, progress=progress, subdir=subdir, excluded_subdirs=excluded_subdirs):
element.info("Pulled artifact {} <- {}".format(display_key, remote.spec.url))
- if subdir:
- # Attempt to extract subdir into artifact extract dir if it already exists
- # without containing the subdir. If the respective artifact extract dir does not
- # exist a complete extraction will complete.
- self.extract(element, key, subdir)
# no need to pull from additional remotes
return True
else: