]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: Ensure ${DATE} and ${TIME} are consistent
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Fri, 6 Sep 2013 15:53:20 +0000 (17:53 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 6 Sep 2013 21:19:26 +0000 (22:19 +0100)
Due to the worker split the ${DATE} and ${TIME} variables could end up
with different values for different workers.

E.g., a task like do_rootfs that is run within a fakeroot environment
had a slightly different view of the time than another task that was not
fakerooted which made it impossible to correctly refer to the image
generated by do_rootfs from the other task.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bin/bitbake-worker
lib/bb/runqueue.py

index 2f21e7c662d3175c272efd975851fb408d743cd2..66b6aabfdb7397d004da48501e201fda777308b6 100755 (executable)
@@ -148,6 +148,8 @@ def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, quieterror
 
             data.setVar("BB_WORKERCONTEXT", "1")
             data.setVar("BUILDNAME", workerdata["buildname"])
+            data.setVar("DATE", workerdata["date"])
+            data.setVar("TIME", workerdata["time"])
             bb.parse.siggen.set_taskdata(workerdata["hashes"], workerdata["hash_deps"], workerdata["sigchecksums"])
             ret = 0
             try:
index 8d36f282ccb73e1094c3185830d0ff9827da62c2..79e612e03212cde6a8446befd58a158ff09d99c1 100644 (file)
@@ -853,6 +853,8 @@ class RunQueue:
             "logdefaultdomain" : bb.msg.loggerDefaultDomains,
             "prhost" : self.cooker.prhost,
             "buildname" : self.cfgData.getVar("BUILDNAME", True),
+            "date" : self.cfgData.getVar("DATE", True),
+            "time" : self.cfgData.getVar("TIME", True),
         }
 
         worker.stdin.write("<cookerconfig>" + pickle.dumps(self.cooker.configuration) + "</cookerconfig>")