Skip to contentSkip to conversation

bitbake-worker: ensure BUILDNAME is available during execution

PATCH New Paul Eggleton 1 participant 1 message Sep 2, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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].

---
 bin/bitbake-worker | 1 +
 lib/bb/runqueue.py | 1 +
 2 files changed, 2 insertions(+)
bin/bitbake-worker +1 -0
index b438d98..2f21e7c 100755
@@ -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:
lib/bb/runqueue.py +1 -0
index 0700a5b..8d36f28 100644
@@ -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("<cookerconfig>" + pickle.dumps(self.cooker.configuration) + "</cookerconfig>")
Signature · 1 line
1.8.1.2