[Notes] [Git][BuildStream/buildstream][tristan/dont-batch-prepare-assemble-by-default] BuildElement: Don't enable batching of prepare and assemble by default



Title: GitLab

Tristan Van Berkom pushed to branch tristan/dont-batch-prepare-assemble-by-default at BuildStream / buildstream

Commits:

11 changed files:

Changes:

  • buildstream/buildelement.py
    ... ... @@ -215,10 +215,6 @@ class BuildElement(Element):
    215 215
             # Setup environment
    
    216 216
             sandbox.set_environment(self.get_environment())
    
    217 217
     
    
    218
    -        # Enable command batching across prepare() and assemble()
    
    219
    -        self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
    
    220
    -                                    collect=self.get_variable('install-root'))
    
    221
    -
    
    222 218
         def stage(self, sandbox):
    
    223 219
     
    
    224 220
             # Stage deps in the sandbox root
    

  • buildstream/plugins/elements/autotools.py
    ... ... @@ -55,7 +55,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    55 55
     details on common configuration options for build elements.
    
    56 56
     """
    
    57 57
     
    
    58
    -from buildstream import BuildElement
    
    58
    +from buildstream import BuildElement, SandboxFlags
    
    59 59
     
    
    60 60
     
    
    61 61
     # Element implementation for the 'autotools' kind.
    
    ... ... @@ -63,6 +63,12 @@ class AutotoolsElement(BuildElement):
    63 63
         # Supports virtual directories (required for remote execution)
    
    64 64
         BST_VIRTUAL_DIRECTORY = True
    
    65 65
     
    
    66
    +    # Enable command batching across prepare() and assemble()
    
    67
    +    def configure_sandbox(self, sandbox):
    
    68
    +        super().configure_sandbox(sandbox)
    
    69
    +        self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
    
    70
    +                                    collect=self.get_variable('install-root'))
    
    71
    +
    
    66 72
     
    
    67 73
     # Plugin entry point
    
    68 74
     def setup():
    

  • buildstream/plugins/elements/cmake.py
    ... ... @@ -54,7 +54,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    54 54
     details on common configuration options for build elements.
    
    55 55
     """
    
    56 56
     
    
    57
    -from buildstream import BuildElement
    
    57
    +from buildstream import BuildElement, SandboxFlags
    
    58 58
     
    
    59 59
     
    
    60 60
     # Element implementation for the 'cmake' kind.
    
    ... ... @@ -62,6 +62,12 @@ class CMakeElement(BuildElement):
    62 62
         # Supports virtual directories (required for remote execution)
    
    63 63
         BST_VIRTUAL_DIRECTORY = True
    
    64 64
     
    
    65
    +    # Enable command batching across prepare() and assemble()
    
    66
    +    def configure_sandbox(self, sandbox):
    
    67
    +        super().configure_sandbox(sandbox)
    
    68
    +        self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
    
    69
    +                                    collect=self.get_variable('install-root'))
    
    70
    +
    
    65 71
     
    
    66 72
     # Plugin entry point
    
    67 73
     def setup():
    

  • buildstream/plugins/elements/distutils.py
    ... ... @@ -31,7 +31,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    31 31
     details on common configuration options for build elements.
    
    32 32
     """
    
    33 33
     
    
    34
    -from buildstream import BuildElement
    
    34
    +from buildstream import BuildElement, SandboxFlags
    
    35 35
     
    
    36 36
     
    
    37 37
     # Element implementation for the python 'distutils' kind.
    
    ... ... @@ -39,6 +39,12 @@ class DistutilsElement(BuildElement):
    39 39
         # Supports virtual directories (required for remote execution)
    
    40 40
         BST_VIRTUAL_DIRECTORY = True
    
    41 41
     
    
    42
    +    # Enable command batching across prepare() and assemble()
    
    43
    +    def configure_sandbox(self, sandbox):
    
    44
    +        super().configure_sandbox(sandbox)
    
    45
    +        self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
    
    46
    +                                    collect=self.get_variable('install-root'))
    
    47
    +
    
    42 48
     
    
    43 49
     # Plugin entry point
    
    44 50
     def setup():
    

  • buildstream/plugins/elements/make.py
    ... ... @@ -36,7 +36,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    36 36
     details on common configuration options for build elements.
    
    37 37
     """
    
    38 38
     
    
    39
    -from buildstream import BuildElement
    
    39
    +from buildstream import BuildElement, SandboxFlags
    
    40 40
     
    
    41 41
     
    
    42 42
     # Element implementation for the 'make' kind.
    
    ... ... @@ -44,6 +44,12 @@ class MakeElement(BuildElement):
    44 44
         # Supports virtual directories (required for remote execution)
    
    45 45
         BST_VIRTUAL_DIRECTORY = True
    
    46 46
     
    
    47
    +    # Enable command batching across prepare() and assemble()
    
    48
    +    def configure_sandbox(self, sandbox):
    
    49
    +        super().configure_sandbox(sandbox)
    
    50
    +        self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
    
    51
    +                                    collect=self.get_variable('install-root'))
    
    52
    +
    
    47 53
     
    
    48 54
     # Plugin entry point
    
    49 55
     def setup():
    

  • buildstream/plugins/elements/makemaker.py
    ... ... @@ -31,7 +31,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    31 31
     details on common configuration options for build elements.
    
    32 32
     """
    
    33 33
     
    
    34
    -from buildstream import BuildElement
    
    34
    +from buildstream import BuildElement, SandboxFlags
    
    35 35
     
    
    36 36
     
    
    37 37
     # Element implementation for the 'makemaker' kind.
    
    ... ... @@ -39,6 +39,12 @@ class MakeMakerElement(BuildElement):
    39 39
         # Supports virtual directories (required for remote execution)
    
    40 40
         BST_VIRTUAL_DIRECTORY = True
    
    41 41
     
    
    42
    +    # Enable command batching across prepare() and assemble()
    
    43
    +    def configure_sandbox(self, sandbox):
    
    44
    +        super().configure_sandbox(sandbox)
    
    45
    +        self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
    
    46
    +                                    collect=self.get_variable('install-root'))
    
    47
    +
    
    42 48
     
    
    43 49
     # Plugin entry point
    
    44 50
     def setup():
    

  • buildstream/plugins/elements/manual.py
    ... ... @@ -31,7 +31,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    31 31
     details on common configuration options for build elements.
    
    32 32
     """
    
    33 33
     
    
    34
    -from buildstream import BuildElement
    
    34
    +from buildstream import BuildElement, SandboxFlags
    
    35 35
     
    
    36 36
     
    
    37 37
     # Element implementation for the 'manual' kind.
    
    ... ... @@ -39,6 +39,12 @@ class ManualElement(BuildElement):
    39 39
         # Supports virtual directories (required for remote execution)
    
    40 40
         BST_VIRTUAL_DIRECTORY = True
    
    41 41
     
    
    42
    +    # Enable command batching across prepare() and assemble()
    
    43
    +    def configure_sandbox(self, sandbox):
    
    44
    +        super().configure_sandbox(sandbox)
    
    45
    +        self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
    
    46
    +                                    collect=self.get_variable('install-root'))
    
    47
    +
    
    42 48
     
    
    43 49
     # Plugin entry point
    
    44 50
     def setup():
    

  • buildstream/plugins/elements/meson.py
    ... ... @@ -51,7 +51,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    51 51
     details on common configuration options for build elements.
    
    52 52
     """
    
    53 53
     
    
    54
    -from buildstream import BuildElement
    
    54
    +from buildstream import BuildElement, SandboxFlags
    
    55 55
     
    
    56 56
     
    
    57 57
     # Element implementation for the 'meson' kind.
    
    ... ... @@ -59,6 +59,12 @@ class MesonElement(BuildElement):
    59 59
         # Supports virtual directories (required for remote execution)
    
    60 60
         BST_VIRTUAL_DIRECTORY = True
    
    61 61
     
    
    62
    +    # Enable command batching across prepare() and assemble()
    
    63
    +    def configure_sandbox(self, sandbox):
    
    64
    +        super().configure_sandbox(sandbox)
    
    65
    +        self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
    
    66
    +                                    collect=self.get_variable('install-root'))
    
    67
    +
    
    62 68
     
    
    63 69
     # Plugin entry point
    
    64 70
     def setup():
    

  • buildstream/plugins/elements/modulebuild.py
    ... ... @@ -31,7 +31,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    31 31
     details on common configuration options for build elements.
    
    32 32
     """
    
    33 33
     
    
    34
    -from buildstream import BuildElement
    
    34
    +from buildstream import BuildElement, SandboxFlags
    
    35 35
     
    
    36 36
     
    
    37 37
     # Element implementation for the 'modulebuild' kind.
    
    ... ... @@ -39,6 +39,12 @@ class ModuleBuildElement(BuildElement):
    39 39
         # Supports virtual directories (required for remote execution)
    
    40 40
         BST_VIRTUAL_DIRECTORY = True
    
    41 41
     
    
    42
    +    # Enable command batching across prepare() and assemble()
    
    43
    +    def configure_sandbox(self, sandbox):
    
    44
    +        super().configure_sandbox(sandbox)
    
    45
    +        self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
    
    46
    +                                    collect=self.get_variable('install-root'))
    
    47
    +
    
    42 48
     
    
    43 49
     # Plugin entry point
    
    44 50
     def setup():
    

  • buildstream/plugins/elements/pip.py
    ... ... @@ -31,7 +31,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    31 31
     details on common configuration options for build elements.
    
    32 32
     """
    
    33 33
     
    
    34
    -from buildstream import BuildElement
    
    34
    +from buildstream import BuildElement, SandboxFlags
    
    35 35
     
    
    36 36
     
    
    37 37
     # Element implementation for the 'pip' kind.
    
    ... ... @@ -39,6 +39,12 @@ class PipElement(BuildElement):
    39 39
         # Supports virtual directories (required for remote execution)
    
    40 40
         BST_VIRTUAL_DIRECTORY = True
    
    41 41
     
    
    42
    +    # Enable command batching across prepare() and assemble()
    
    43
    +    def configure_sandbox(self, sandbox):
    
    44
    +        super().configure_sandbox(sandbox)
    
    45
    +        self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
    
    46
    +                                    collect=self.get_variable('install-root'))
    
    47
    +
    
    42 48
     
    
    43 49
     # Plugin entry point
    
    44 50
     def setup():
    

  • buildstream/plugins/elements/qmake.py
    ... ... @@ -31,7 +31,7 @@ See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    31 31
     details on common configuration options for build elements.
    
    32 32
     """
    
    33 33
     
    
    34
    -from buildstream import BuildElement
    
    34
    +from buildstream import BuildElement, SandboxFlags
    
    35 35
     
    
    36 36
     
    
    37 37
     # Element implementation for the 'qmake' kind.
    
    ... ... @@ -39,6 +39,12 @@ class QMakeElement(BuildElement):
    39 39
         # Supports virtual directories (required for remote execution)
    
    40 40
         BST_VIRTUAL_DIRECTORY = True
    
    41 41
     
    
    42
    +    # Enable command batching across prepare() and assemble()
    
    43
    +    def configure_sandbox(self, sandbox):
    
    44
    +        super().configure_sandbox(sandbox)
    
    45
    +        self.batch_prepare_assemble(SandboxFlags.ROOT_READ_ONLY,
    
    46
    +                                    collect=self.get_variable('install-root'))
    
    47
    +
    
    42 48
     
    
    43 49
     # Plugin entry point
    
    44 50
     def setup():
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]