Skip to contentSkip to conversation

runqueue.py: set BB_TASKHASH approriately after moving to fork()

PATCH Applied Kevin Tian 2 participants 2 messages Dec 21, 2010

lore
Share & tools
lore

Kevin Tian

author
#0 lore raw

PATCH 1/1 runqueue.py: set BB_TASKHASH approriately after moving to fork()

In previous exec() model, cooker is re-initialized from scratch with environmental variable exported accordingly. Now in fork() model, environmental variables are not exported again, and thus original method to export BB_TASKHASH doesn't apply now which breaks all sstate packages. Now we can set data variable directly instead.

---
 bitbake/lib/bb/runqueue.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
bitbake/lib/bb/runqueue.py +2 -1
index b4134f8..ab0e873 100644
@@ -1072,7 +1072,6 @@ class RunQueueExecute:
                 bb.mkdirhier(p)
             bb.msg.debug(2, bb.msg.domain.RunQueue, "Running %s:%s under fakeroot, state dir is %s" % (fn, taskname, fakedirs))
 
-        env['BB_TASKHASH'] = self.rqdata.runq_hash[task]
         env['PATH'] = self.cooker.configuration.initial_path
 
         envbackup = os.environ.copy()
@@ -1120,6 +1119,8 @@ class RunQueueExecute:
             for h in self.rqdata.hashdata["deps"]:
                 bb.data.setVar("BBHASHDEPS_%s" % h, self.rqdata.hashdata["deps"][h], the_data)
 
+            bb.data.setVar("BB_TASKHASH", self.rqdata.runq_hash[task], the_data)
+
             ret = 0
             try:
                 if not self.cooker.configuration.dry_run:
Signature · 1 line
1.6.0.4
#1 lore raw
Quoted 9 lines · Kevin Tian

In previous exec() model, cooker is re-initialized from scratch with environmental variable exported accordingly. Now in fork() model, environmental variables are not exported again, and thus original method to export BB_TASKHASH doesn't apply now which breaks all sstate packages. Now we can set data variable directly instead.

---
 bitbake/lib/bb/runqueue.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Merged into master, thanks.

Richard