summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2018-12-13 14:58:28 +0000
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2018-12-13 14:58:28 +0000
commit60ddeeb918b812c15549b4a30ce9598b088c6c2d (patch)
treeba7fc34b1853c6423b7c69639461cabe1b7dc570
parent224aa4c23eb6186b109a61a2754c16660e59ff38 (diff)
parent4c0e602c5273fecac4583f854082983281d85cc6 (diff)
downloadbuildstream-60ddeeb918b812c15549b4a30ce9598b088c6c2d.tar.gz
Merge branch 'tristan/dont-batch-prepare-assemble-by-default' into 'master'
Dont batch prepare assemble by default Closes #800 See merge request BuildStream/buildstream!1009
-rw-r--r--buildstream/buildelement.py4
-rw-r--r--buildstream/plugins/elements/autotools.py8
-rw-r--r--buildstream/plugins/elements/cmake.py8
-rw-r--r--buildstream/plugins/elements/distutils.py11
-rw-r--r--buildstream/plugins/elements/make.py8
-rw-r--r--buildstream/plugins/elements/makemaker.py11
-rw-r--r--buildstream/plugins/elements/manual.py11
-rw-r--r--buildstream/plugins/elements/meson.py8
-rw-r--r--buildstream/plugins/elements/modulebuild.py11
-rw-r--r--buildstream/plugins/elements/pip.py11
-rw-r--r--buildstream/plugins/elements/qmake.py8
11 files changed, 80 insertions, 19 deletions
diff --git a/buildstream/buildelement.py b/buildstream/buildelement.py
index 06c623590..6ef060f12 100644
--- a/buildstream/buildelement.py
+++ b/buildstream/buildelement.py
@@ -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
diff --git a/buildstream/plugins/elements/autotools.py b/buildstream/plugins/elements/autotools.py
index 43fe7add4..2243a73f9 100644
--- a/buildstream/plugins/elements/autotools.py
+++ b/buildstream/plugins/elements/autotools.py
@@ -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():
diff --git a/buildstream/plugins/elements/cmake.py b/buildstream/plugins/elements/cmake.py
index de9aa9616..a1bea0cd6 100644
--- a/buildstream/plugins/elements/cmake.py
+++ b/buildstream/plugins/elements/cmake.py
@@ -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():
diff --git a/buildstream/plugins/elements/distutils.py b/buildstream/plugins/elements/distutils.py
index 20a2d67ef..94d7a9705 100644
--- a/buildstream/plugins/elements/distutils.py
+++ b/buildstream/plugins/elements/distutils.py
@@ -31,12 +31,19 @@ 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.
class DistutilsElement(BuildElement):
- pass
+ # 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
diff --git a/buildstream/plugins/elements/make.py b/buildstream/plugins/elements/make.py
index a22de168a..262dc2b3f 100644
--- a/buildstream/plugins/elements/make.py
+++ b/buildstream/plugins/elements/make.py
@@ -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():
diff --git a/buildstream/plugins/elements/makemaker.py b/buildstream/plugins/elements/makemaker.py
index 8ad979984..c3161581a 100644
--- a/buildstream/plugins/elements/makemaker.py
+++ b/buildstream/plugins/elements/makemaker.py
@@ -31,12 +31,19 @@ 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.
class MakeMakerElement(BuildElement):
- pass
+ # 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
diff --git a/buildstream/plugins/elements/manual.py b/buildstream/plugins/elements/manual.py
index 3300d017a..7ca761428 100644
--- a/buildstream/plugins/elements/manual.py
+++ b/buildstream/plugins/elements/manual.py
@@ -31,12 +31,19 @@ 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.
class ManualElement(BuildElement):
- pass
+ # 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
diff --git a/buildstream/plugins/elements/meson.py b/buildstream/plugins/elements/meson.py
index 0d5ca0087..b16f025a0 100644
--- a/buildstream/plugins/elements/meson.py
+++ b/buildstream/plugins/elements/meson.py
@@ -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():
diff --git a/buildstream/plugins/elements/modulebuild.py b/buildstream/plugins/elements/modulebuild.py
index d619a1d01..a83d2705d 100644
--- a/buildstream/plugins/elements/modulebuild.py
+++ b/buildstream/plugins/elements/modulebuild.py
@@ -31,12 +31,19 @@ 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.
class ModuleBuildElement(BuildElement):
- pass
+ # 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
diff --git a/buildstream/plugins/elements/pip.py b/buildstream/plugins/elements/pip.py
index 02b593af3..31e1071f0 100644
--- a/buildstream/plugins/elements/pip.py
+++ b/buildstream/plugins/elements/pip.py
@@ -31,12 +31,19 @@ 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.
class PipElement(BuildElement):
- pass
+ # 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
diff --git a/buildstream/plugins/elements/qmake.py b/buildstream/plugins/elements/qmake.py
index d6776b0b2..1bb5fd74a 100644
--- a/buildstream/plugins/elements/qmake.py
+++ b/buildstream/plugins/elements/qmake.py
@@ -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():