diff options
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index adafa80770..80ae8a2a46 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -37,6 +37,7 @@ from bb import monitordisk | |||
37 | import subprocess | 37 | import subprocess |
38 | import pickle | 38 | import pickle |
39 | from multiprocessing import Process | 39 | from multiprocessing import Process |
40 | import shlex | ||
40 | 41 | ||
41 | bblogger = logging.getLogger("BitBake") | 42 | bblogger = logging.getLogger("BitBake") |
42 | logger = logging.getLogger("BitBake.RunQueue") | 43 | logger = logging.getLogger("BitBake.RunQueue") |
@@ -1220,12 +1221,12 @@ class RunQueue: | |||
1220 | if fakeroot: | 1221 | if fakeroot: |
1221 | magic = magic + "beef" | 1222 | magic = magic + "beef" |
1222 | mcdata = self.cooker.databuilder.mcdata[mc] | 1223 | mcdata = self.cooker.databuilder.mcdata[mc] |
1223 | fakerootcmd = mcdata.getVar("FAKEROOTCMD") | 1224 | fakerootcmd = shlex.split(mcdata.getVar("FAKEROOTCMD")) |
1224 | fakerootenv = (mcdata.getVar("FAKEROOTBASEENV") or "").split() | 1225 | fakerootenv = (mcdata.getVar("FAKEROOTBASEENV") or "").split() |
1225 | env = os.environ.copy() | 1226 | env = os.environ.copy() |
1226 | for key, value in (var.split('=') for var in fakerootenv): | 1227 | for key, value in (var.split('=') for var in fakerootenv): |
1227 | env[key] = value | 1228 | env[key] = value |
1228 | worker = subprocess.Popen([fakerootcmd, "bitbake-worker", magic], stdout=subprocess.PIPE, stdin=subprocess.PIPE, env=env) | 1229 | worker = subprocess.Popen(fakerootcmd + ["bitbake-worker", magic], stdout=subprocess.PIPE, stdin=subprocess.PIPE, env=env) |
1229 | else: | 1230 | else: |
1230 | worker = subprocess.Popen(["bitbake-worker", magic], stdout=subprocess.PIPE, stdin=subprocess.PIPE) | 1231 | worker = subprocess.Popen(["bitbake-worker", magic], stdout=subprocess.PIPE, stdin=subprocess.PIPE) |
1231 | bb.utils.nonblockingfd(worker.stdout) | 1232 | bb.utils.nonblockingfd(worker.stdout) |