diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2019-02-14 15:36:45 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-15 08:18:19 +0000 |
commit | 9025bd11ec494709242ec5d22b245155c497741f (patch) | |
tree | 368fc4331d69c9cb7240080a5eeeb1482ffaa19f /bitbake | |
parent | 7e52e59222d39dbb9c1c30a8e33d839db752a386 (diff) | |
download | poky-9025bd11ec494709242ec5d22b245155c497741f.tar.gz |
bitbake: bitbake: Allow arguments in FAKEROOTCMD
Changes FAKEROOTCMD so that it can accept additional arguments to pass
to the fakeroot implementation instead of being treated as a simple
command
(Bitbake rev: 4fa51afb56b090cf1f746842acd602c9536715d5)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-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) |