diff options
Diffstat (limited to 'src/buildstream/_artifactelement.py')
-rw-r--r-- | src/buildstream/_artifactelement.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/buildstream/_artifactelement.py b/src/buildstream/_artifactelement.py index cfd3c29c8..b8ea4c1e8 100644 --- a/src/buildstream/_artifactelement.py +++ b/src/buildstream/_artifactelement.py @@ -119,6 +119,22 @@ class ArtifactElement(Element): artifact = self._get_artifact() return artifact.get_dependency_refs(deps=scope) + # configure_sandbox() + # + # Configure a sandbox for installing artifacts into + # + # Args: + # sandbox (Sandbox) + # + def configure_sandbox(self, sandbox): + install_root = self.get_variable('install-root') + + # Tell the sandbox to mount the build root and install root + sandbox.mark_directory(install_root) + + # Tell sandbox which directory is preserved in the finished artifact + sandbox.set_output_directory(install_root) + # Override Element._calculate_cache_key def _calculate_cache_key(self, dependencies=None): return self._key |