Skip to content
Snippets Groups Projects
Commit 7df48e50 authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

BuildElement: Don't enable batching of prepare and assemble by default

Some external plugins depend derive from BuildElement and are broken
by BuildElement enabling this batching by default.

Instead, enable it in all of the individual build element plugin
implementations.

This fixes issue #800
parent 30acb0f9
No related branches found
No related tags found
No related merge requests found
Pipeline #40000061 passed
......@@ -215,10 +215,6 @@ class BuildElement(Element):
# Setup environment
sandbox.set_environment(self.get_environment())
# Enable command batching across prepare() and assemble()
self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
collect=self.get_variable('install-root'))
def stage(self, sandbox):
# Stage deps in the sandbox root
......
......@@ -55,7 +55,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
details on common configuration options for build elements.
"""
from buildstream import BuildElement
from buildstream import BuildElement, SandboxFlags
# Element implementation for the 'autotools' kind.
......@@ -63,6 +63,12 @@ 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)
self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
collect=self.get_variable('install-root'))
# Plugin entry point
def setup():
......
......@@ -54,7 +54,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
details on common configuration options for build elements.
"""
from buildstream import BuildElement
from buildstream import BuildElement, SandboxFlags
# Element implementation for the 'cmake' kind.
......@@ -62,6 +62,12 @@ class CMakeElement(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)
self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
collect=self.get_variable('install-root'))
# Plugin entry point
def setup():
......
......@@ -31,7 +31,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
details on common configuration options for build elements.
"""
from buildstream import BuildElement
from buildstream import BuildElement, SandboxFlags
# Element implementation for the python 'distutils' kind.
......@@ -39,6 +39,12 @@ class DistutilsElement(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)
self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
collect=self.get_variable('install-root'))
# Plugin entry point
def setup():
......
......@@ -36,7 +36,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
details on common configuration options for build elements.
"""
from buildstream import BuildElement
from buildstream import BuildElement, SandboxFlags
# Element implementation for the 'make' kind.
......@@ -44,6 +44,12 @@ class MakeElement(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)
self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
collect=self.get_variable('install-root'))
# Plugin entry point
def setup():
......
......@@ -31,7 +31,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
details on common configuration options for build elements.
"""
from buildstream import BuildElement
from buildstream import BuildElement, SandboxFlags
# Element implementation for the 'makemaker' kind.
......@@ -39,6 +39,12 @@ class MakeMakerElement(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)
self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
collect=self.get_variable('install-root'))
# Plugin entry point
def setup():
......
......@@ -31,7 +31,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
details on common configuration options for build elements.
"""
from buildstream import BuildElement
from buildstream import BuildElement, SandboxFlags
# Element implementation for the 'manual' kind.
......@@ -39,6 +39,12 @@ 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)
self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
collect=self.get_variable('install-root'))
# Plugin entry point
def setup():
......
......@@ -51,7 +51,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
details on common configuration options for build elements.
"""
from buildstream import BuildElement
from buildstream import BuildElement, SandboxFlags
# Element implementation for the 'meson' kind.
......@@ -59,6 +59,12 @@ class MesonElement(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)
self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
collect=self.get_variable('install-root'))
# Plugin entry point
def setup():
......
......@@ -31,7 +31,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
details on common configuration options for build elements.
"""
from buildstream import BuildElement
from buildstream import BuildElement, SandboxFlags
# Element implementation for the 'modulebuild' kind.
......@@ -39,6 +39,12 @@ class ModuleBuildElement(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)
self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
collect=self.get_variable('install-root'))
# Plugin entry point
def setup():
......
......@@ -31,7 +31,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
details on common configuration options for build elements.
"""
from buildstream import BuildElement
from buildstream import BuildElement, SandboxFlags
# Element implementation for the 'pip' kind.
......@@ -39,6 +39,12 @@ 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)
self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
collect=self.get_variable('install-root'))
# Plugin entry point
def setup():
......
......@@ -31,7 +31,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
details on common configuration options for build elements.
"""
from buildstream import BuildElement
from buildstream import BuildElement, SandboxFlags
# Element implementation for the 'qmake' kind.
......@@ -39,6 +39,12 @@ class QMakeElement(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)
self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
collect=self.get_variable('install-root'))
# Plugin entry point
def setup():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment