aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-21 13:35:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-11 17:21:46 +0000
commit4bcf8babc4e2b9c00076882b3f1a4d0b68de82c2 (patch)
tree7cbc34fdf7faaf2f1b6cf4863c45f25f5a06a0ab
parentba5ee79aba01a83055365176d3641bff94b46e7c (diff)
downloadopenembedded-core-contrib-4bcf8babc4e2b9c00076882b3f1a4d0b68de82c2.tar.gz
openembedded-core-contrib-4bcf8babc4e2b9c00076882b3f1a4d0b68de82c2.tar.bz2
openembedded-core-contrib-4bcf8babc4e2b9c00076882b3f1a4d0b68de82c2.zip
bitbake: runqueue: Fix setscene issues with multiconfig
setscene was being entirelu skipped for multiconfig variants as the tasks were simply not being spotted. If the default config was also being built it masked the problem. When this was fixed by using taskfn instead of fn in lookups against dataCache, several other instances of this problem were highlighted. This goes through and corrects the setscene code to correclty use taskfn instead of fn in the appropriate places meaning setscene tasks for multiconfig now work correctly. (Bitbake rev: a5d81eefe9106f2080001b7313e2b15ab21ea55b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/runqueue.py38
1 files changed, 19 insertions, 19 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index c305631a969..b4f2013f0d2 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -289,8 +289,8 @@ class RunQueueData:
return tid + task_name_suffix
def get_short_user_idstring(self, task, task_name_suffix = ""):
- (mc, fn, taskname, _) = split_tid_mcfn(task)
- pn = self.dataCaches[mc].pkg_fn[fn]
+ (mc, fn, taskname, taskfn) = split_tid_mcfn(task)
+ pn = self.dataCaches[mc].pkg_fn[taskfn]
taskname = taskname_from_tid(task) + task_name_suffix
return "%s:%s" % (pn, taskname)
@@ -884,14 +884,14 @@ class RunQueueData:
if not self.cooker.configuration.nosetscene:
for tid in self.runtaskentries:
(mc, fn, taskname, _) = split_tid_mcfn(tid)
- setscenetid = fn + ":" + taskname + "_setscene"
+ setscenetid = tid + "_setscene"
if setscenetid not in taskData[mc].taskentries:
continue
self.runq_setscene_tids.append(tid)
def invalidate_task(tid, error_nostamp):
- (mc, fn, taskname, _) = split_tid_mcfn(tid)
- taskdep = self.dataCaches[mc].task_deps[fn]
+ (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
+ taskdep = self.dataCaches[mc].task_deps[taskfn]
if fn + ":" + taskname not in taskData[mc].taskentries:
logger.warning("Task %s does not exist, invalidating this task will have no effect" % taskname)
if 'nostamp' in taskdep and taskname in taskdep['nostamp']:
@@ -1323,7 +1323,7 @@ class RunQueue:
continue
sq_fn.append(fn)
- sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[fn])
+ sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[taskfn])
sq_hash.append(self.rqdata.runtaskentries[tid].hash)
sq_taskname.append(taskname)
sq_task.append(tid)
@@ -1403,8 +1403,8 @@ class RunQueue:
for tid in invalidtasks:
- (mc, fn, taskname, _) = split_tid_mcfn(tid)
- pn = self.rqdata.dataCaches[mc].pkg_fn[fn]
+ (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
+ pn = self.rqdata.dataCaches[mc].pkg_fn[taskfn]
h = self.rqdata.runtaskentries[tid].hash
matches = bb.siggen.find_siginfo(pn, taskname, [], self.cfgData)
match = None
@@ -1507,8 +1507,8 @@ class RunQueueExecute:
taskdata = {}
taskdeps.add(task)
for dep in taskdeps:
- (mc, fn, taskname, _) = split_tid_mcfn(dep)
- pn = self.rqdata.dataCaches[mc].pkg_fn[fn]
+ (mc, fn, taskname, taskfn) = split_tid_mcfn(dep)
+ pn = self.rqdata.dataCaches[mc].pkg_fn[taskfn]
taskdata[dep] = [pn, taskname, fn]
call = self.rq.depvalidate + "(task, taskdata, notneeded, d)"
locs = { "task" : task, "taskdata" : taskdata, "notneeded" : self.scenequeue_notneeded, "d" : self.cooker.expanded_data }
@@ -1708,7 +1708,7 @@ class RunQueueExecuteTasks(RunQueueExecute):
# Check tasks that are going to run against the whitelist
def check_norun_task(tid, showerror=False):
- (mc, fn, taskname, _) = split_tid_mcfn(tid)
+ (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
# Ignore covered tasks
if tid in self.rq.scenequeue_covered:
return False
@@ -1716,11 +1716,11 @@ class RunQueueExecuteTasks(RunQueueExecute):
if self.rq.check_stamp_task(tid, taskname, cache=self.stampcache):
return False
# Ignore noexec tasks
- taskdep = self.rqdata.dataCaches[mc].task_deps[fn]
+ taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
if 'noexec' in taskdep and taskname in taskdep['noexec']:
return False
- pn = self.rqdata.dataCaches[mc].pkg_fn[fn]
+ pn = self.rqdata.dataCaches[mc].pkg_fn[taskfn]
if not check_setscene_enforce_whitelist(pn, taskname, self.rqdata.setscenewhitelist):
if showerror:
if tid in self.rqdata.runq_setscene_tids:
@@ -1979,8 +1979,8 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
# e.g. do_sometask_setscene[depends] = "targetname:do_someothertask_setscene"
# Note that anything explicitly depended upon will have its reverse dependencies removed to avoid circular dependencies
for tid in self.rqdata.runq_setscene_tids:
- (mc, fn, taskname, _) = split_tid_mcfn(tid)
- realtid = fn + ":" + taskname + "_setscene"
+ (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
+ realtid = tid + "_setscene"
idepends = self.rqdata.taskData[mc].taskentries[realtid].idepends
for (depname, idependtask) in idepends:
@@ -2045,7 +2045,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
for tid in self.sq_revdeps:
(mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
- taskdep = self.rqdata.dataCaches[mc].task_deps[fn]
+ taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
if 'noexec' in taskdep and taskname in taskdep['noexec']:
noexec.append(tid)
@@ -2066,7 +2066,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
continue
sq_fn.append(fn)
- sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[fn])
+ sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[taskfn])
sq_hash.append(self.rqdata.runtaskentries[tid].hash)
sq_taskname.append(taskname)
sq_task.append(tid)
@@ -2114,8 +2114,8 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
def check_taskfail(self, task):
if self.rqdata.setscenewhitelist:
realtask = task.split('_setscene')[0]
- (mc, fn, taskname, _) = split_tid_mcfn(realtask)
- pn = self.rqdata.dataCaches[mc].pkg_fn[fn]
+ (mc, fn, taskname, taskfn) = split_tid_mcfn(realtask)
+ pn = self.rqdata.dataCaches[mc].pkg_fn[taskfn]
if not check_setscene_enforce_whitelist(pn, taskname, self.rqdata.setscenewhitelist):
logger.error('Task %s.%s failed' % (pn, taskname + "_setscene"))
self.rq.state = runQueueCleanUp