summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2019-02-14 15:36:45 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-15 08:18:19 +0000
commit9025bd11ec494709242ec5d22b245155c497741f (patch)
tree368fc4331d69c9cb7240080a5eeeb1482ffaa19f /bitbake
parent7e52e59222d39dbb9c1c30a8e33d839db752a386 (diff)
downloadpoky-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.py5
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
37import subprocess 37import subprocess
38import pickle 38import pickle
39from multiprocessing import Process 39from multiprocessing import Process
40import shlex
40 41
41bblogger = logging.getLogger("BitBake") 42bblogger = logging.getLogger("BitBake")
42logger = logging.getLogger("BitBake.RunQueue") 43logger = 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)