summaryrefslogtreecommitdiff
path: root/buildstream/buildelement.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-02-22 20:24:12 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-02-22 20:24:12 +0900
commit9cecd41f392381ceca544f2f6d894bcde8385f32 (patch)
tree22070d2711574c148bd912367ad2f243b0611aee /buildstream/buildelement.py
parentf0208508020eea4c2b5027237a8189fb7c887935 (diff)
downloadbuildstream-9cecd41f392381ceca544f2f6d894bcde8385f32.tar.gz
buildelement.py: Explicitly consider 'notparallel' in cache key resolution
Only really applies to build elements.
Diffstat (limited to 'buildstream/buildelement.py')
-rw-r--r--buildstream/buildelement.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/buildstream/buildelement.py b/buildstream/buildelement.py
index 4d9de5cb3..f753bdb9b 100644
--- a/buildstream/buildelement.py
+++ b/buildstream/buildelement.py
@@ -55,6 +55,14 @@ class BuildElement(Element):
for command_name, command_list in self.commands.items():
dictionary[command_name] = command_list
+ # Specifying notparallel for a given element effects the
+ # cache key, while having the side effect of setting max-jobs to 1,
+ # which is normally automatically resolved and does not effect
+ # the cache key.
+ variables = self._get_variables()
+ if self.node_get_member(variables.variables, bool, 'notparallel', default_value=False):
+ dictionary['notparallel'] = True
+
return dictionary
def assemble(self, sandbox):