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:34:39 +0900
commit2634183c9ae9b605050a687f8dba2cecaabce5c7 (patch)
treee32031731c7ac73678fffff0796c237e409ea338
parent8fd3ec266e13b108e9e49a57454ba8dd6cb22411 (diff)
downloadbuildstream-remove-secret-command-lists-backport.tar.gz
buildelement.py: Remove secret undocumented command listsremove-secret-command-lists-backport
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