소스 검색

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 <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Paul Eggleton 12 년 전
부모
커밋
e63c577573
2개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      bitbake/bin/bitbake-worker
  2. 1 0
      bitbake/lib/bb/runqueue.py

+ 1 - 0
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:

+ 1 - 0
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("<cookerconfig>" + pickle.dumps(self.cooker.configuration) + "</cookerconfig>")