summaryrefslogtreecommitdiff
path: root/buildstream/scriptelement.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/scriptelement.py')
-rw-r--r--buildstream/scriptelement.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/buildstream/scriptelement.py b/buildstream/scriptelement.py
index e9ad60c37..d2165ce32 100644
--- a/buildstream/scriptelement.py
+++ b/buildstream/scriptelement.py
@@ -202,7 +202,7 @@ class ScriptElement(Element):
sandbox.set_environment(self.get_environment())
# Tell the sandbox to mount the install root
- directories = {'/': False}
+ directories = {self.__install_root: False}
# Mark the artifact directories in the layout
for item in self.__layout:
@@ -211,7 +211,10 @@ class ScriptElement(Element):
directories[destination] = item['element'] or was_artifact
for directory, artifact in directories.items():
- sandbox.mark_directory(directory, artifact=artifact)
+ # Root does not need to be marked as it is always mounted
+ # with artifact (unless explicitly marked non-artifact)
+ if directory != '/':
+ sandbox.mark_directory(directory, artifact=artifact)
def stage(self, sandbox):