You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by gi...@apache.org on 2020/12/29 13:14:15 UTC

[buildstream] 30/30: Inject environment to bwrap through its command line

This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch valentindavid/flatpak-demo
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 6716a56c4092e7b0162ff6f08f6d9c35e2b05a6f
Author: Valentin David <va...@codethink.co.uk>
AuthorDate: Sat Jul 7 15:57:01 2018 +0200

    Inject environment to bwrap through its command line
---
 buildstream/sandbox/_sandboxbwrap.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/buildstream/sandbox/_sandboxbwrap.py b/buildstream/sandbox/_sandboxbwrap.py
index 3a0645a..a068569 100644
--- a/buildstream/sandbox/_sandboxbwrap.py
+++ b/buildstream/sandbox/_sandboxbwrap.py
@@ -152,6 +152,9 @@ class SandboxBwrap(Sandbox):
                 gid = self._get_config().build_gid
                 bwrap_command += ['--uid', str(uid), '--gid', str(gid)]
 
+        for k, v in env.items():
+            bwrap_command += ['--setenv', k, v]
+
         # Add the command
         bwrap_command += command