bitbake: bitbake-worker: allow '=' in environment variable values

Limit the split to key & value (2 items) instead of the n items one
can get if there are '=' characters in the value.

Fixes [YOCTO #15447]

(Bitbake rev: 86315961829ab1d137a0265cc246c44d3929e1fb)

Signed-off-by: david d zuhn <david.zuhn@sonos.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
david d zuhn
2024-03-18 13:50:05 -05:00
committed by Richard Purdie
parent 0acdb81ca6
commit ecb1248914
2 changed files with 3 additions and 3 deletions

View File

@@ -1359,7 +1359,7 @@ class RunQueue:
fakerootcmd = shlex.split(mcdata.getVar("FAKEROOTCMD"))
fakerootenv = (mcdata.getVar("FAKEROOTBASEENV") or "").split()
env = os.environ.copy()
for key, value in (var.split('=') for var in fakerootenv):
for key, value in (var.split('=',1) for var in fakerootenv):
env[key] = value
worker = subprocess.Popen(fakerootcmd + [sys.executable, workerscript, magic], stdout=subprocess.PIPE, stdin=subprocess.PIPE, env=env)
fakerootlogs = self.rqdata.dataCaches[mc].fakerootlogs