Skip to contentSkip to conversation

Make ${DATE} and ${TIME} consistent

PATCH New Peter Kjellerstedt 1 participant 2 messages Sep 6, 2013

lore
Share & tools
lore
#0 lore raw

cover Make ${DATE} and ${TIME} consistent

This fixes a problem with ${DATE} and ${TIME} not being consistent between different workers. E.g., a fakerooted task had a different time than a non-fakerooted one...

//Peter

The following changes since commit ed3ef0823fde89371a473d20c0127c0bd16d062b:

qemumips: fix keyboard entry in graphical boots (2013-09-05 16:27:54 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib pkj/consistent_date_and_time
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/consistent_date_and_time

Peter Kjellerstedt (1):
bitbake: Ensure ${DATE} and ${TIME} are consistent

 bitbake/bin/bitbake-worker | 2 ++
 bitbake/lib/bb/runqueue.py | 2 ++
 2 files changed, 4 insertions(+)
Signature · 1 line
1.8.2.1
#1 lore raw

PATCH 1/1 bitbake: Ensure ${DATE} and ${TIME} are consistent

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.

---
 bitbake/bin/bitbake-worker | 2 ++
 bitbake/lib/bb/runqueue.py | 2 ++
 2 files changed, 4 insertions(+)
bitbake/bin/bitbake-worker +2 -0
index 2f21e7c..66b6aab 100755
@@ -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:
bitbake/lib/bb/runqueue.py +2 -0
index 8d36f28..79e612e 100644
@@ -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>")
Signature · 1 line
1.8.2.1