summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-04-10 13:11:04 +0100
committerAngelos Evripiotis <jevripiotis@bloomberg.net>2019-05-23 16:16:35 +0100
commit54c5c3a2fa58bca02786665110cccd2e50c3128e (patch)
tree7cee0a2fe2169816cb71ff026e2f1a8d8cebec84
parent8035af8cd6fd996b90ba2fa3d9aa09afcc8ffada (diff)
downloadbuildstream-aevri/picklable_jobs.tar.gz
Revert "WIP: pickle: rm special cases, plugins pickle now"aevri/picklable_jobs
This reverts commit 0a9b85460c2ad1298449a1eea936a2ca30220ffd.
-rw-r--r--src/buildstream/_artifactcache.py6
-rw-r--r--src/buildstream/_sourcecache.py2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/buildstream/_artifactcache.py b/src/buildstream/_artifactcache.py
index 091b44dda..7ba043f38 100644
--- a/src/buildstream/_artifactcache.py
+++ b/src/buildstream/_artifactcache.py
@@ -70,6 +70,12 @@ class ArtifactCache(BaseCache):
self.cas.add_reachable_directories_callback(self._reachable_directories)
self.cas.add_reachable_digests_callback(self._reachable_digests)
+ def __getstate__(self):
+ state = self.__dict__.copy()
+ # TODO: actually pickle the elements, resolving to the same objects.
+ state['_required_elements'] = set()
+ return state
+
# mark_required_elements():
#
# Mark elements whose artifacts are required for the current run.
diff --git a/src/buildstream/_sourcecache.py b/src/buildstream/_sourcecache.py
index 23dc8e976..e067f042c 100644
--- a/src/buildstream/_sourcecache.py
+++ b/src/buildstream/_sourcecache.py
@@ -60,6 +60,8 @@ class SourceCache(BaseCache):
def __getstate__(self):
state = self.__dict__.copy()
+ # TODO: actually pickle the sources, resolving to the same objects.
+ state['_required_sources'] = set()
return state
# mark_required_sources()