diff options
Diffstat (limited to 'buildstream')
-rw-r--r-- | buildstream/buildelement.py | 4 | ||||
-rw-r--r-- | buildstream/data/projectconfig.yaml | 8 | ||||
-rw-r--r-- | buildstream/element.py | 1 | ||||
-rw-r--r-- | buildstream/plugins/elements/script.yaml | 8 |
4 files changed, 9 insertions, 12 deletions
diff --git a/buildstream/buildelement.py b/buildstream/buildelement.py index c275cfb9d..5a986bd11 100644 --- a/buildstream/buildelement.py +++ b/buildstream/buildelement.py @@ -90,7 +90,7 @@ of the staged sources. Result collection ~~~~~~~~~~~~~~~~~ Finally, the resulting build *artifact* is collected from the the ``%{install-root}`` -directory (which is normally configured as ``/buildstream/install``) inside the sandbox. +directory (which is normally configured as ``/buildstream-install``) inside the sandbox. All build elements must install into the ``%{install-root}`` using whatever semantic the given build system provides to do this. E.g. for standard autotools @@ -222,7 +222,7 @@ class BuildElement(Element): "will not be allowed to stage to %{build-root}.") # Return the payload, this is configurable but is generally - # always the /buildstream/install directory + # always the /buildstream-install directory return self.get_variable('install-root') def _get_commands(self, node, name): diff --git a/buildstream/data/projectconfig.yaml b/buildstream/data/projectconfig.yaml index 408304544..b4ad2dcb9 100644 --- a/buildstream/data/projectconfig.yaml +++ b/buildstream/data/projectconfig.yaml @@ -29,6 +29,10 @@ variables: # Note: this value defaults to the number of cores available max-jobs: 4 + # Note: These variables are defined later on in element.py and _project.py + element-name: "" + project-name: "" + # Path configuration, to be used in build instructions. # prefix: "/usr" @@ -50,10 +54,10 @@ variables: # Indicates the default build directory where input is # normally staged - build-root: /buildstream/build + build-root: /buildstream/%{project-name}/%{element-name} # Indicates the build installation directory in the sandbox - install-root: /buildstream/install + install-root: /buildstream-install # Arguments for tooling used when stripping debug symbols objcopy-link-args: --add-gnu-debuglink diff --git a/buildstream/element.py b/buildstream/element.py index 8532f995c..131a834e1 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -173,6 +173,7 @@ class Element(Plugin): # Collect the composited variables and resolve them variables = self.__extract_variables(meta) + variables['element-name'] = self.name self.__variables = Variables(variables) # Collect the composited environment now that we have variables diff --git a/buildstream/plugins/elements/script.yaml b/buildstream/plugins/elements/script.yaml index 56a656cf6..b388378da 100644 --- a/buildstream/plugins/elements/script.yaml +++ b/buildstream/plugins/elements/script.yaml @@ -1,15 +1,7 @@ # Common script element variables variables: - # Defines the directory that output is collected from once commands - # have been run. - install-root: /buildstream/install - # # Defines the directory commands will be run from. cwd: / - # - # Not directly used, but expected to be used when staging elements to be - # worked on. - build-root: /buildstream/build # Script element configuration config: |