diff options
author | Darius Makovsky <traveltissues@protonmail.com> | 2019-09-27 16:48:21 +0100 |
---|---|---|
committer | Darius Makovsky <traveltissues@protonmail.com> | 2019-09-27 17:17:41 +0100 |
commit | 55697cc4cae5784baa32e95c574dca827a44aa95 (patch) | |
tree | bae9eaf861b17cbf41f9ed0a18f30593873fb389 | |
parent | d97395e163720ba441f622c45c41163b7879ef7c (diff) | |
download | buildstream-traveltissues/benchmark-2.tar.gz |
Commit workspace sources to sourcecache after generating their keystraveltissues/benchmark-2
-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() |