summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-01-12 16:57:57 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-01-12 17:33:59 +0900
commit170a9d469a36337990a324d4be2b5c42306b1b13 (patch)
tree7733d2b11cf7329f1cdc311a35c59d6eaa94baf9
parent36026a72a9458c72df07e33e411d9300eb6f66f2 (diff)
downloadbuildstream-remove-secret-command-lists.tar.gz
buildelement.py: Remove secret undocumented command listsremove-secret-command-lists
Originally this was created with also `bootstrap-commands` and `test-commands` but these were never documented or used. For `bootstrap-commands`, these originated in baserock but are basically a part of the `configure-commands` stage, prepending commands to `configure-commands` is more suitable here since we now have the prepend/append list directives. For `test-commands`, these were never used and it's unclear at this time if it's the correct place for it. It would be interesting to implement `test-commands` as a separate operation which can run in parallel with reverse dependency builds (no need to block the build of a reverse dependency on failing tests, we can still fail the build as a whole based on a failing test without blocking builds).
-rw-r--r--buildstream/buildelement.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/buildstream/buildelement.py b/buildstream/buildelement.py
index 0870c83ad..c275cfb9d 100644
--- a/buildstream/buildelement.py
+++ b/buildstream/buildelement.py
@@ -101,10 +101,19 @@ import os
from . import Element, Scope, ElementError
from . import SandboxFlags
-_command_steps = ['bootstrap-commands',
- 'configure-commands',
+
+# This list is preserved because of an unfortunate situation, we
+# need to remove these older commands which were secret and never
+# documented, but without breaking the cache keys.
+_legacy_command_steps = ['bootstrap-commands',
+ 'configure-commands',
+ 'build-commands',
+ 'test-commands',
+ 'install-commands',
+ 'strip-commands']
+
+_command_steps = ['configure-commands',
'build-commands',
- 'test-commands',
'install-commands',
'strip-commands']
@@ -120,8 +129,11 @@ class BuildElement(Element):
# extend the configuration
self.node_validate(node, _command_steps)
- for command_name in _command_steps:
- self.commands[command_name] = self._get_commands(node, command_name)
+ for command_name in _legacy_command_steps:
+ if command_name in _command_steps:
+ self.commands[command_name] = self._get_commands(node, command_name)
+ else:
+ self.commands[command_name] = []
def preflight(self):
pass