diff options
| -rw-r--r-- | src/buildstream/element.py | 3 | ||||
| -rw-r--r-- | src/buildstream/plugins/sources/workspace.py | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py index ef610bcc1..73151043d 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -2225,6 +2225,9 @@ class Element(Plugin): # Check all sources are in source cache for source in self.__sources: + # XXX workspaces are not necessarily cached + if source.get_kind() == 'workspace': + sourcecache.commit(source, []) if not sourcecache.contains(source): return False diff --git a/src/buildstream/plugins/sources/workspace.py b/src/buildstream/plugins/sources/workspace.py index f303ce656..cacc02cd3 100644 --- a/src/buildstream/plugins/sources/workspace.py +++ b/src/buildstream/plugins/sources/workspace.py @@ -104,10 +104,6 @@ class WorkspaceSource(Source): reason='ensure-stage-dir-fail') self.__digest = self.__cas_dir._get_digest().hash - # commit to cache if not cached - if not sourcecache.contains(self): - sourcecache.commit(self, []) - # now close down grpc channels sourcecache.cas.close_channel() assert not sourcecache.cas.has_open_grpc_channels() |
