summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()