From e63c5775732055a32b417c01fb68711f33ff4ac3 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Mon, 2 Sep 2013 18:26:28 +0100 Subject: [PATCH] bitbake: bitbake-worker: ensure BUILDNAME is available during execution BUILDNAME is set from cooker by default, so since the worker split it will not be set when executing functions. In OpenEmbedded this results in /etc/version (which is populated from BUILDNAME) not having any content. Pass this variable value through to the worker explicitly to fix the issue. Fixes [YOCTO #4818]. (Bitbake rev: 92940b0427d9b2b3f95e27c230ec1e36638a34bc) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- bitbake/bin/bitbake-worker | 1 + bitbake/lib/bb/runqueue.py | 1 + 2 files changed, 2 insertions(+) diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker index b438d98dc9..2f21e7c662 100755 --- a/bitbake/bin/bitbake-worker +++ b/bitbake/bin/bitbake-worker @@ -147,6 +147,7 @@ def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, quieterror os.umask(umask) data.setVar("BB_WORKERCONTEXT", "1") + data.setVar("BUILDNAME", workerdata["buildname"]) bb.parse.siggen.set_taskdata(workerdata["hashes"], workerdata["hash_deps"], workerdata["sigchecksums"]) ret = 0 try: diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 0700a5bf71..8d36f282cc 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -852,6 +852,7 @@ class RunQueue: "logdefaultverboselogs" : bb.msg.loggerVerboseLogs, "logdefaultdomain" : bb.msg.loggerDefaultDomains, "prhost" : self.cooker.prhost, + "buildname" : self.cfgData.getVar("BUILDNAME", True), } worker.stdin.write("" + pickle.dumps(self.cooker.configuration) + "")