]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake-worker: ensure BUILDNAME is available during execution
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 2 Sep 2013 17:26:28 +0000 (18:26 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Sep 2013 13:18:22 +0000 (14:18 +0100)
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].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bin/bitbake-worker
lib/bb/runqueue.py

index b438d98dc92441cd565f309d3bd934ce830d249e..2f21e7c662d3175c272efd975851fb408d743cd2 100755 (executable)
@@ -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:
index 0700a5bf710f45e2882aa851b43f777a3d9418b5..8d36f282ccb73e1094c3185830d0ff9827da62c2 100644 (file)
@@ -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>")