summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-01-21 10:17:12 +0100
committerJürg Billeter <j@bitron.ch>2020-02-03 18:44:30 +0000
commit4a3cba6efe8fa7b29ab6f2395c4683958f533490 (patch)
tree8b3dd868464796f6b20d110dcd2bfe25ad1dd2b3
parent044a9c6d896faec114a09db1ab561b1a571c1bac (diff)
downloadbuildstream-4a3cba6efe8fa7b29ab6f2395c4683958f533490.tar.gz
_sandboxbuildboxrun.py: Bind mount /dev in interactive mode
-rw-r--r--src/buildstream/sandbox/_sandboxbuildboxrun.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buildstream/sandbox/_sandboxbuildboxrun.py b/src/buildstream/sandbox/_sandboxbuildboxrun.py
index 7b4362cb1..93ee330b1 100644
--- a/src/buildstream/sandbox/_sandboxbuildboxrun.py
+++ b/src/buildstream/sandbox/_sandboxbuildboxrun.py
@@ -107,6 +107,11 @@ class SandboxBuildBoxRun(SandboxREAPI):
# disconnected from terminal.
if flags & SandboxFlags.INTERACTIVE:
stdin = sys.stdin
+
+ if "bind-mount" in self._capabilities:
+ # In interactive mode, we want a complete devpts inside
+ # the container, so there is a /dev/console and such.
+ buildbox_command.append("--bind-mount=/dev:/dev")
else:
stdin = subprocess.DEVNULL