From 170a9d469a36337990a324d4be2b5c42306b1b13 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Fri, 12 Jan 2018 16:57:57 +0900 Subject: buildelement.py: Remove secret undocumented 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). --- buildstream/buildelement.py | 22 +++++++++++++++++----- 1 file 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 -- cgit v1.2.1