]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqueue.py: set BB_TASKHASH approriately after moving to fork()
authorKevin Tian <kevin.tian@intel.com>
Tue, 21 Dec 2010 07:02:22 +0000 (15:02 +0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 21 Dec 2010 08:48:17 +0000 (08:48 +0000)
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.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
bitbake/lib/bb/runqueue.py

index 37e1ac06bfeeb3eaa9b4f3b42fe15bfd20b6501f..4f988dfdc9b0363df969044c4d3133387ebead46 100644 (file)
@@ -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()
@@ -1123,6 +1122,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: