diff options
author | Jürg Billeter <j@bitron.ch> | 2020-02-27 09:38:32 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2020-04-28 05:01:39 +0000 |
commit | fc66c3606f68721985ffe899bc0d2713224b45b9 (patch) | |
tree | 57c630cb24f3e16a6851f38a248bac6cb88c197f /src | |
parent | e1f96f6dd4174cb9d1e8bb71724f281088d7a1f4 (diff) | |
download | buildstream-fc66c3606f68721985ffe899bc0d2713224b45b9.tar.gz |
element.py: Drop BST_VIRTUAL_DIRECTORY
`Sandbox.get_directory()` no longer exists.
Diffstat (limited to 'src')
-rw-r--r-- | src/buildstream/_artifactelement.py | 4 | ||||
-rw-r--r-- | src/buildstream/element.py | 15 | ||||
-rw-r--r-- | src/buildstream/plugins/elements/autotools.py | 3 | ||||
-rw-r--r-- | src/buildstream/plugins/elements/compose.py | 3 | ||||
-rw-r--r-- | src/buildstream/plugins/elements/filter.py | 3 | ||||
-rw-r--r-- | src/buildstream/plugins/elements/import.py | 3 | ||||
-rw-r--r-- | src/buildstream/plugins/elements/manual.py | 3 | ||||
-rw-r--r-- | src/buildstream/plugins/elements/pip.py | 3 | ||||
-rw-r--r-- | src/buildstream/plugins/elements/script.py | 5 | ||||
-rw-r--r-- | src/buildstream/plugins/elements/stack.py | 3 |
10 files changed, 0 insertions, 45 deletions
diff --git a/src/buildstream/_artifactelement.py b/src/buildstream/_artifactelement.py index 4b6d6dd50..4066cef06 100644 --- a/src/buildstream/_artifactelement.py +++ b/src/buildstream/_artifactelement.py @@ -42,10 +42,6 @@ class ArtifactElement(Element): # A hash of ArtifactElement by ref __instantiated_artifacts = {} # type: Dict[str, ArtifactElement] - # ArtifactElement's require this as the sandbox will use a normal - # directory when we checkout - BST_VIRTUAL_DIRECTORY = True - def __init__(self, context, ref): _, element, key = verify_artifact_ref(ref) diff --git a/src/buildstream/element.py b/src/buildstream/element.py index 9efe97c54..862f00962 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -187,11 +187,6 @@ class Element(Plugin): """Whether to raise exceptions if an element has sources. """ - BST_VIRTUAL_DIRECTORY = False - """Whether to raise exceptions if an element uses Sandbox.get_directory - instead of Sandbox.get_virtual_directory. - """ - BST_RUN_COMMANDS = True """Whether the element may run commands using Sandbox.run. """ @@ -2456,14 +2451,6 @@ class Element(Plugin): if directory is not None and allow_remote and self.__use_remote_execution(): - if not self.BST_VIRTUAL_DIRECTORY: - raise ElementError( - "Element {} is configured to use remote execution but plugin does not support it.".format( - self.name - ), - detail="Plugin '{kind}' does not support virtual directories.".format(kind=self.get_kind()), - ) - self.info("Using a remote sandbox for artifact {} with directory '{}'".format(self.name, directory)) output_files_required = context.require_artifact_files or self._artifact_files_required() @@ -2477,7 +2464,6 @@ class Element(Plugin): stderr=stderr, config=config, specs=self.__remote_execution_specs, - allow_real_directory=False, output_files_required=output_files_required, output_node_properties=output_node_properties, ) @@ -2495,7 +2481,6 @@ class Element(Plugin): stdout=stdout, stderr=stderr, config=config, - allow_real_directory=not self.BST_VIRTUAL_DIRECTORY, output_node_properties=output_node_properties, ) yield sandbox diff --git a/src/buildstream/plugins/elements/autotools.py b/src/buildstream/plugins/elements/autotools.py index 089c9bca0..c4396c5cc 100644 --- a/src/buildstream/plugins/elements/autotools.py +++ b/src/buildstream/plugins/elements/autotools.py @@ -60,9 +60,6 @@ from buildstream import BuildElement, SandboxFlags # Element implementation for the 'autotools' kind. class AutotoolsElement(BuildElement): - # Supports virtual directories (required for remote execution) - BST_VIRTUAL_DIRECTORY = True - # Enable command batching across prepare() and assemble() def configure_sandbox(self, sandbox): super().configure_sandbox(sandbox) diff --git a/src/buildstream/plugins/elements/compose.py b/src/buildstream/plugins/elements/compose.py index 3ac5dec8d..6e4aed193 100644 --- a/src/buildstream/plugins/elements/compose.py +++ b/src/buildstream/plugins/elements/compose.py @@ -55,9 +55,6 @@ class ComposeElement(Element): # added, to reduce the potential for confusion BST_FORBID_SOURCES = True - # This plugin has been modified to avoid the use of Sandbox.get_directory - BST_VIRTUAL_DIRECTORY = True - def configure(self, node): node.validate_keys(["integrate", "include", "exclude", "include-orphans"]) diff --git a/src/buildstream/plugins/elements/filter.py b/src/buildstream/plugins/elements/filter.py index d5749ad2d..37b205fe2 100644 --- a/src/buildstream/plugins/elements/filter.py +++ b/src/buildstream/plugins/elements/filter.py @@ -151,9 +151,6 @@ class FilterElement(Element): # added, to reduce the potential for confusion BST_FORBID_SOURCES = True - # This plugin has been modified to avoid the use of Sandbox.get_directory - BST_VIRTUAL_DIRECTORY = True - # Filter elements do not run any commands BST_RUN_COMMANDS = False diff --git a/src/buildstream/plugins/elements/import.py b/src/buildstream/plugins/elements/import.py index 2b68197a7..2bbd11354 100644 --- a/src/buildstream/plugins/elements/import.py +++ b/src/buildstream/plugins/elements/import.py @@ -38,9 +38,6 @@ from buildstream import Element, ElementError class ImportElement(Element): # pylint: disable=attribute-defined-outside-init - # This plugin has been modified to avoid the use of Sandbox.get_directory - BST_VIRTUAL_DIRECTORY = True - # Import elements do not run any commands BST_RUN_COMMANDS = False diff --git a/src/buildstream/plugins/elements/manual.py b/src/buildstream/plugins/elements/manual.py index 97da41615..c95b8e5a2 100644 --- a/src/buildstream/plugins/elements/manual.py +++ b/src/buildstream/plugins/elements/manual.py @@ -36,9 +36,6 @@ from buildstream import BuildElement, SandboxFlags # Element implementation for the 'manual' kind. class ManualElement(BuildElement): - # Supports virtual directories (required for remote execution) - BST_VIRTUAL_DIRECTORY = True - # Enable command batching across prepare() and assemble() def configure_sandbox(self, sandbox): super().configure_sandbox(sandbox) diff --git a/src/buildstream/plugins/elements/pip.py b/src/buildstream/plugins/elements/pip.py index 93303748d..06e187b69 100644 --- a/src/buildstream/plugins/elements/pip.py +++ b/src/buildstream/plugins/elements/pip.py @@ -36,9 +36,6 @@ from buildstream import BuildElement, SandboxFlags # Element implementation for the 'pip' kind. class PipElement(BuildElement): - # Supports virtual directories (required for remote execution) - BST_VIRTUAL_DIRECTORY = True - # Enable command batching across prepare() and assemble() def configure_sandbox(self, sandbox): super().configure_sandbox(sandbox) diff --git a/src/buildstream/plugins/elements/script.py b/src/buildstream/plugins/elements/script.py index abfb7b3b0..e355e5f05 100644 --- a/src/buildstream/plugins/elements/script.py +++ b/src/buildstream/plugins/elements/script.py @@ -40,11 +40,6 @@ import buildstream # Element implementation for the 'script' kind. class ScriptElement(buildstream.ScriptElement): - # pylint: disable=attribute-defined-outside-init - - # This plugin has been modified to avoid the use of Sandbox.get_directory - BST_VIRTUAL_DIRECTORY = True - def configure(self, node): for n in node.get_sequence("layout", []): dst = self.node_subst_vars(n.get_scalar("destination")) diff --git a/src/buildstream/plugins/elements/stack.py b/src/buildstream/plugins/elements/stack.py index f569199b6..df11a257f 100644 --- a/src/buildstream/plugins/elements/stack.py +++ b/src/buildstream/plugins/elements/stack.py @@ -30,9 +30,6 @@ from buildstream import Element # Element implementation for the 'stack' kind. class StackElement(Element): - # This plugin has been modified to avoid the use of Sandbox.get_directory - BST_VIRTUAL_DIRECTORY = True - # This plugin does not produce any artifacts when built BST_ELEMENT_HAS_ARTIFACT = False |