diff options
author | Jürg Billeter <j@bitron.ch> | 2019-06-13 17:58:22 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-08-20 07:41:23 +0200 |
commit | 4b82baa1a8c89a33f40bd20fbff10af4ec2dbbf2 (patch) | |
tree | f40cd67b0caea8c722d734480d8076e80e9984a5 /src/buildstream/_artifactcache.py | |
parent | 54deb4be42bcbdefc52cbdd4da59de4d3305c700 (diff) | |
download | buildstream-4b82baa1a8c89a33f40bd20fbff10af4ec2dbbf2.tar.gz |
cascache.py: Remove add_reachable_*_callback() methods
Diffstat (limited to 'src/buildstream/_artifactcache.py')
-rw-r--r-- | src/buildstream/_artifactcache.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/buildstream/_artifactcache.py b/src/buildstream/_artifactcache.py index 7e245fbfa..736a98b27 100644 --- a/src/buildstream/_artifactcache.py +++ b/src/buildstream/_artifactcache.py @@ -102,9 +102,6 @@ class ArtifactCache(BaseCache): self.artifactdir = context.artifactdir os.makedirs(self.artifactdir, exist_ok=True) - self.cas.add_reachable_directories_callback(self._reachable_directories) - self.cas.add_reachable_digests_callback(self._reachable_digests) - # mark_required_elements(): # # Mark elements whose artifacts are required for the current run. @@ -459,42 +456,6 @@ class ArtifactCache(BaseCache): # Local Private Methods # ################################################ - # _reachable_directories() - # - # Returns: - # (iter): Iterator over directories digests available from artifacts. - # - def _reachable_directories(self): - for root, _, files in os.walk(self.artifactdir): - for artifact_file in files: - artifact = artifact_pb2.Artifact() - with open(os.path.join(root, artifact_file), 'r+b') as f: - artifact.ParseFromString(f.read()) - - if str(artifact.files): - yield artifact.files - - if str(artifact.buildtree): - yield artifact.buildtree - - # _reachable_digests() - # - # Returns: - # (iter): Iterator over single file digests in artifacts - # - def _reachable_digests(self): - for root, _, files in os.walk(self.artifactdir): - for artifact_file in files: - artifact = artifact_pb2.Artifact() - with open(os.path.join(root, artifact_file), 'r+b') as f: - artifact.ParseFromString(f.read()) - - if str(artifact.public_data): - yield artifact.public_data - - for log_file in artifact.logs: - yield log_file.digest - # _push_artifact() # # Pushes relevant directories and then artifact proto to remote. |