summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan van Berkom <tristan@codethink.co.uk>2020-09-11 14:24:26 +0900
committerTristan van Berkom <tristan@codethink.co.uk>2020-09-18 12:38:49 +0900
commitf72013bd16ecfe34341e31ae37b72546ec7a39e8 (patch)
treef01e6310ec36a1a83d2f0f4cb01ba2b55bf84a4d
parentdc3132c828106a2298dc92fc0d53294c845921fa (diff)
downloadbuildstream-f72013bd16ecfe34341e31ae37b72546ec7a39e8.tar.gz
buildelement.py: Remove legacy command steps
This was actually deadcode, since node.validate_keys() was called on the configure dictionary without the legacy command steps. If any element was using the legacy commands, they would have been met with a load time error anyway. This commit also updates the cache key test, since removing these legacy commands affects BuildElement internally in such a way as to affect the cache keys.
-rw-r--r--src/buildstream/buildelement.py14
-rw-r--r--tests/cachekey/project/elements/build1.expected2
-rw-r--r--tests/cachekey/project/elements/build2.expected2
-rw-r--r--tests/cachekey/project/target.expected2
4 files changed, 4 insertions, 16 deletions
diff --git a/src/buildstream/buildelement.py b/src/buildstream/buildelement.py
index a7900a25d..bbd544d20 100644
--- a/src/buildstream/buildelement.py
+++ b/src/buildstream/buildelement.py
@@ -140,18 +140,6 @@ from .element import Element
from .sandbox import SandboxFlags
-# 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", "install-commands", "strip-commands"]
@@ -171,7 +159,7 @@ class BuildElement(Element):
self._command_subdir = self.get_variable("command-subdir") # pylint: disable=attribute-defined-outside-init
- for command_name in _legacy_command_steps:
+ for command_name in _command_steps:
self.__commands[command_name] = node.get_str_list(command_name, [])
def preflight(self):
diff --git a/tests/cachekey/project/elements/build1.expected b/tests/cachekey/project/elements/build1.expected
index 71113a494..369036a16 100644
--- a/tests/cachekey/project/elements/build1.expected
+++ b/tests/cachekey/project/elements/build1.expected
@@ -1 +1 @@
-99eb5ee7e7b93f1f9e4abfd2b392ed3b9746aeebc74f9239e5e0ca3ca444ab47 \ No newline at end of file
+e47d9b32ba894f1d454b66d8d30d3d20226b54c327e8b6a3893c9c55ff02378c \ No newline at end of file
diff --git a/tests/cachekey/project/elements/build2.expected b/tests/cachekey/project/elements/build2.expected
index 10d60050d..6e9dfd075 100644
--- a/tests/cachekey/project/elements/build2.expected
+++ b/tests/cachekey/project/elements/build2.expected
@@ -1 +1 @@
-9458b71a2054df6ca3d1ce9df2090649b1416a368e41ae40bfa0cc52f5efb05e \ No newline at end of file
+ffe535e1ac311448584d9f0b17f51bb85c8cc9bd3c081a411f9c3ea464f5fcd7 \ No newline at end of file
diff --git a/tests/cachekey/project/target.expected b/tests/cachekey/project/target.expected
index 3a718b2ac..cdffef609 100644
--- a/tests/cachekey/project/target.expected
+++ b/tests/cachekey/project/target.expected
@@ -1 +1 @@
-629e8d188cc2a88e2474bfabd45d4eb6d5e55435445bd1e5596953de564830dd \ No newline at end of file
+19f1ae47ae0ab8883ff17c89f4c323ac0ef1e28b35d369c8a398350de60ca0eb \ No newline at end of file