summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
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 /bitbake/lib/bb
parentba5ee79aba01a83055365176d3641bff94b46e7c (diff)
downloadpoky-4bcf8babc4e2b9c00076882b3f1a4d0b68de82c2.tar.gz
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>
Diffstat (limited to 'bitbake/lib/bb')
-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 c305631a96..b4f2013f0d 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -289,8 +289,8 @@ class RunQueueData:
289 return tid + task_name_suffix 289 return tid + task_name_suffix
290 290
291 def get_short_user_idstring(self, task, task_name_suffix = ""): 291 def get_short_user_idstring(self, task, task_name_suffix = ""):
292 (mc, fn, taskname, _) = split_tid_mcfn(task) 292 (mc, fn, taskname, taskfn) = split_tid_mcfn(task)
293 pn = self.dataCaches[mc].pkg_fn[fn] 293 pn = self.dataCaches[mc].pkg_fn[taskfn]
294 taskname = taskname_from_tid(task) + task_name_suffix 294 taskname = taskname_from_tid(task) + task_name_suffix
295 return "%s:%s" % (pn, taskname) 295 return "%s:%s" % (pn, taskname)
296 296
@@ -884,14 +884,14 @@ class RunQueueData:
884 if not self.cooker.configuration.nosetscene: 884 if not self.cooker.configuration.nosetscene:
885 for tid in self.runtaskentries: 885 for tid in self.runtaskentries:
886 (mc, fn, taskname, _) = split_tid_mcfn(tid) 886 (mc, fn, taskname, _) = split_tid_mcfn(tid)
887 setscenetid = fn + ":" + taskname + "_setscene" 887 setscenetid = tid + "_setscene"
888 if setscenetid not in taskData[mc].taskentries: 888 if setscenetid not in taskData[mc].taskentries:
889 continue 889 continue
890 self.runq_setscene_tids.append(tid) 890 self.runq_setscene_tids.append(tid)
891 891
892 def invalidate_task(tid, error_nostamp): 892 def invalidate_task(tid, error_nostamp):
893 (mc, fn, taskname, _) = split_tid_mcfn(tid) 893 (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
894 taskdep = self.dataCaches[mc].task_deps[fn] 894 taskdep = self.dataCaches[mc].task_deps[taskfn]
895 if fn + ":" + taskname not in taskData[mc].taskentries: 895 if fn + ":" + taskname not in taskData[mc].taskentries:
896 logger.warning("Task %s does not exist, invalidating this task will have no effect" % taskname) 896 logger.warning("Task %s does not exist, invalidating this task will have no effect" % taskname)
897 if 'nostamp' in taskdep and taskname in taskdep['nostamp']: 897 if 'nostamp' in taskdep and taskname in taskdep['nostamp']:
@@ -1323,7 +1323,7 @@ class RunQueue:
1323 continue 1323 continue
1324 1324
1325 sq_fn.append(fn) 1325 sq_fn.append(fn)
1326 sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[fn]) 1326 sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[taskfn])
1327 sq_hash.append(self.rqdata.runtaskentries[tid].hash) 1327 sq_hash.append(self.rqdata.runtaskentries[tid].hash)
1328 sq_taskname.append(taskname) 1328 sq_taskname.append(taskname)
1329 sq_task.append(tid) 1329 sq_task.append(tid)
@@ -1403,8 +1403,8 @@ class RunQueue:
1403 1403
1404 1404
1405 for tid in invalidtasks: 1405 for tid in invalidtasks:
1406 (mc, fn, taskname, _) = split_tid_mcfn(tid) 1406 (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
1407 pn = self.rqdata.dataCaches[mc].pkg_fn[fn] 1407 pn = self.rqdata.dataCaches[mc].pkg_fn[taskfn]
1408 h = self.rqdata.runtaskentries[tid].hash 1408 h = self.rqdata.runtaskentries[tid].hash
1409 matches = bb.siggen.find_siginfo(pn, taskname, [], self.cfgData) 1409 matches = bb.siggen.find_siginfo(pn, taskname, [], self.cfgData)
1410 match = None 1410 match = None
@@ -1507,8 +1507,8 @@ class RunQueueExecute:
1507 taskdata = {} 1507 taskdata = {}
1508 taskdeps.add(task) 1508 taskdeps.add(task)
1509 for dep in taskdeps: 1509 for dep in taskdeps:
1510 (mc, fn, taskname, _) = split_tid_mcfn(dep) 1510 (mc, fn, taskname, taskfn) = split_tid_mcfn(dep)
1511 pn = self.rqdata.dataCaches[mc].pkg_fn[fn] 1511 pn = self.rqdata.dataCaches[mc].pkg_fn[taskfn]
1512 taskdata[dep] = [pn, taskname, fn] 1512 taskdata[dep] = [pn, taskname, fn]
1513 call = self.rq.depvalidate + "(task, taskdata, notneeded, d)" 1513 call = self.rq.depvalidate + "(task, taskdata, notneeded, d)"
1514 locs = { "task" : task, "taskdata" : taskdata, "notneeded" : self.scenequeue_notneeded, "d" : self.cooker.expanded_data } 1514 locs = { "task" : task, "taskdata" : taskdata, "notneeded" : self.scenequeue_notneeded, "d" : self.cooker.expanded_data }
@@ -1708,7 +1708,7 @@ class RunQueueExecuteTasks(RunQueueExecute):
1708 1708
1709 # Check tasks that are going to run against the whitelist 1709 # Check tasks that are going to run against the whitelist
1710 def check_norun_task(tid, showerror=False): 1710 def check_norun_task(tid, showerror=False):
1711 (mc, fn, taskname, _) = split_tid_mcfn(tid) 1711 (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
1712 # Ignore covered tasks 1712 # Ignore covered tasks
1713 if tid in self.rq.scenequeue_covered: 1713 if tid in self.rq.scenequeue_covered:
1714 return False 1714 return False
@@ -1716,11 +1716,11 @@ class RunQueueExecuteTasks(RunQueueExecute):
1716 if self.rq.check_stamp_task(tid, taskname, cache=self.stampcache): 1716 if self.rq.check_stamp_task(tid, taskname, cache=self.stampcache):
1717 return False 1717 return False
1718 # Ignore noexec tasks 1718 # Ignore noexec tasks
1719 taskdep = self.rqdata.dataCaches[mc].task_deps[fn] 1719 taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
1720 if 'noexec' in taskdep and taskname in taskdep['noexec']: 1720 if 'noexec' in taskdep and taskname in taskdep['noexec']:
1721 return False 1721 return False
1722 1722
1723 pn = self.rqdata.dataCaches[mc].pkg_fn[fn] 1723 pn = self.rqdata.dataCaches[mc].pkg_fn[taskfn]
1724 if not check_setscene_enforce_whitelist(pn, taskname, self.rqdata.setscenewhitelist): 1724 if not check_setscene_enforce_whitelist(pn, taskname, self.rqdata.setscenewhitelist):
1725 if showerror: 1725 if showerror:
1726 if tid in self.rqdata.runq_setscene_tids: 1726 if tid in self.rqdata.runq_setscene_tids:
@@ -1979,8 +1979,8 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
1979 # e.g. do_sometask_setscene[depends] = "targetname:do_someothertask_setscene" 1979 # e.g. do_sometask_setscene[depends] = "targetname:do_someothertask_setscene"
1980 # Note that anything explicitly depended upon will have its reverse dependencies removed to avoid circular dependencies 1980 # Note that anything explicitly depended upon will have its reverse dependencies removed to avoid circular dependencies
1981 for tid in self.rqdata.runq_setscene_tids: 1981 for tid in self.rqdata.runq_setscene_tids:
1982 (mc, fn, taskname, _) = split_tid_mcfn(tid) 1982 (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
1983 realtid = fn + ":" + taskname + "_setscene" 1983 realtid = tid + "_setscene"
1984 idepends = self.rqdata.taskData[mc].taskentries[realtid].idepends 1984 idepends = self.rqdata.taskData[mc].taskentries[realtid].idepends
1985 for (depname, idependtask) in idepends: 1985 for (depname, idependtask) in idepends:
1986 1986
@@ -2045,7 +2045,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
2045 for tid in self.sq_revdeps: 2045 for tid in self.sq_revdeps:
2046 (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) 2046 (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
2047 2047
2048 taskdep = self.rqdata.dataCaches[mc].task_deps[fn] 2048 taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
2049 2049
2050 if 'noexec' in taskdep and taskname in taskdep['noexec']: 2050 if 'noexec' in taskdep and taskname in taskdep['noexec']:
2051 noexec.append(tid) 2051 noexec.append(tid)
@@ -2066,7 +2066,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
2066 continue 2066 continue
2067 2067
2068 sq_fn.append(fn) 2068 sq_fn.append(fn)
2069 sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[fn]) 2069 sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[taskfn])
2070 sq_hash.append(self.rqdata.runtaskentries[tid].hash) 2070 sq_hash.append(self.rqdata.runtaskentries[tid].hash)
2071 sq_taskname.append(taskname) 2071 sq_taskname.append(taskname)
2072 sq_task.append(tid) 2072 sq_task.append(tid)
@@ -2114,8 +2114,8 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
2114 def check_taskfail(self, task): 2114 def check_taskfail(self, task):
2115 if self.rqdata.setscenewhitelist: 2115 if self.rqdata.setscenewhitelist:
2116 realtask = task.split('_setscene')[0] 2116 realtask = task.split('_setscene')[0]
2117 (mc, fn, taskname, _) = split_tid_mcfn(realtask) 2117 (mc, fn, taskname, taskfn) = split_tid_mcfn(realtask)
2118 pn = self.rqdata.dataCaches[mc].pkg_fn[fn] 2118 pn = self.rqdata.dataCaches[mc].pkg_fn[taskfn]
2119 if not check_setscene_enforce_whitelist(pn, taskname, self.rqdata.setscenewhitelist): 2119 if not check_setscene_enforce_whitelist(pn, taskname, self.rqdata.setscenewhitelist):
2120 logger.error('Task %s.%s failed' % (pn, taskname + "_setscene")) 2120 logger.error('Task %s.%s failed' % (pn, taskname + "_setscene"))
2121 self.rq.state = runQueueCleanUp 2121 self.rq.state = runQueueCleanUp