diff options
Diffstat (limited to 'src/buildstream')
-rw-r--r-- | src/buildstream/_stream.py | 6 | ||||
-rw-r--r-- | src/buildstream/source.py | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py index c71bec80a..4824c7d81 100644 --- a/src/buildstream/_stream.py +++ b/src/buildstream/_stream.py @@ -188,6 +188,12 @@ class Stream(): # in which case we just blindly trust the directory, using the element # definitions to control the execution environment only. if directory is None: + + if not element._source_cached(): + raise StreamError( + "Sources for element {} are not cached." + "Element must be fetched.".format(element._get_full_name())) + missing_deps = [ dep for dep in self._pipeline.dependencies([element], scope) if not dep._cached() diff --git a/src/buildstream/source.py b/src/buildstream/source.py index 0312517c9..5321363a4 100644 --- a/src/buildstream/source.py +++ b/src/buildstream/source.py @@ -1118,10 +1118,6 @@ class Source(Plugin): self.__key = generate_key(keys) - sourcecache = self._get_context().sourcecache - if self.BST_KEY_REQUIRES_STAGE and not sourcecache.contains(self): - sourcecache.commit(self, []) - @property def _key(self): return self.__key |