diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-21 13:35:53 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-22 12:36:40 +0000 |
commit | f048db1c6444d93578b4648938da18f22985e389 (patch) | |
tree | 909b63f20405e7f65603778cdb40c8951478f008 /bitbake/lib | |
parent | d6799e655e21c3c3ef60f5dec5eb53a693430a2f (diff) | |
download | poky-f048db1c6444d93578b4648938da18f22985e389.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: cead85cf219c07b40aeb7c0d948c25f0429136db)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 25a2684001..10c5c2e667 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -290,8 +290,8 @@ class RunQueueData: | |||
290 | return tid + task_name_suffix | 290 | return tid + task_name_suffix |
291 | 291 | ||
292 | def get_short_user_idstring(self, task, task_name_suffix = ""): | 292 | def get_short_user_idstring(self, task, task_name_suffix = ""): |
293 | (mc, fn, taskname, _) = split_tid_mcfn(task) | 293 | (mc, fn, taskname, taskfn) = split_tid_mcfn(task) |
294 | pn = self.dataCaches[mc].pkg_fn[fn] | 294 | pn = self.dataCaches[mc].pkg_fn[taskfn] |
295 | taskname = taskname_from_tid(task) + task_name_suffix | 295 | taskname = taskname_from_tid(task) + task_name_suffix |
296 | return "%s:%s" % (pn, taskname) | 296 | return "%s:%s" % (pn, taskname) |
297 | 297 | ||
@@ -885,14 +885,14 @@ class RunQueueData: | |||
885 | if not self.cooker.configuration.nosetscene: | 885 | if not self.cooker.configuration.nosetscene: |
886 | for tid in self.runtaskentries: | 886 | for tid in self.runtaskentries: |
887 | (mc, fn, taskname, _) = split_tid_mcfn(tid) | 887 | (mc, fn, taskname, _) = split_tid_mcfn(tid) |
888 | setscenetid = fn + ":" + taskname + "_setscene" | 888 | setscenetid = tid + "_setscene" |
889 | if setscenetid not in taskData[mc].taskentries: | 889 | if setscenetid not in taskData[mc].taskentries: |
890 | continue | 890 | continue |
891 | self.runq_setscene_tids.append(tid) | 891 | self.runq_setscene_tids.append(tid) |
892 | 892 | ||
893 | def invalidate_task(tid, error_nostamp): | 893 | def invalidate_task(tid, error_nostamp): |
894 | (mc, fn, taskname, _) = split_tid_mcfn(tid) | 894 | (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) |
895 | taskdep = self.dataCaches[mc].task_deps[fn] | 895 | taskdep = self.dataCaches[mc].task_deps[taskfn] |
896 | if fn + ":" + taskname not in taskData[mc].taskentries: | 896 | if fn + ":" + taskname not in taskData[mc].taskentries: |
897 | logger.warning("Task %s does not exist, invalidating this task will have no effect" % taskname) | 897 | logger.warning("Task %s does not exist, invalidating this task will have no effect" % taskname) |
898 | if 'nostamp' in taskdep and taskname in taskdep['nostamp']: | 898 | if 'nostamp' in taskdep and taskname in taskdep['nostamp']: |
@@ -1339,7 +1339,7 @@ class RunQueue: | |||
1339 | continue | 1339 | continue |
1340 | 1340 | ||
1341 | sq_fn.append(fn) | 1341 | sq_fn.append(fn) |
1342 | sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[fn]) | 1342 | sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[taskfn]) |
1343 | sq_hash.append(self.rqdata.runtaskentries[tid].hash) | 1343 | sq_hash.append(self.rqdata.runtaskentries[tid].hash) |
1344 | sq_taskname.append(taskname) | 1344 | sq_taskname.append(taskname) |
1345 | sq_task.append(tid) | 1345 | sq_task.append(tid) |
@@ -1419,8 +1419,8 @@ class RunQueue: | |||
1419 | 1419 | ||
1420 | 1420 | ||
1421 | for tid in invalidtasks: | 1421 | for tid in invalidtasks: |
1422 | (mc, fn, taskname, _) = split_tid_mcfn(tid) | 1422 | (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) |
1423 | pn = self.rqdata.dataCaches[mc].pkg_fn[fn] | 1423 | pn = self.rqdata.dataCaches[mc].pkg_fn[taskfn] |
1424 | h = self.rqdata.runtaskentries[tid].hash | 1424 | h = self.rqdata.runtaskentries[tid].hash |
1425 | matches = bb.siggen.find_siginfo(pn, taskname, [], self.cfgData) | 1425 | matches = bb.siggen.find_siginfo(pn, taskname, [], self.cfgData) |
1426 | match = None | 1426 | match = None |
@@ -1523,8 +1523,8 @@ class RunQueueExecute: | |||
1523 | taskdata = {} | 1523 | taskdata = {} |
1524 | taskdeps.add(task) | 1524 | taskdeps.add(task) |
1525 | for dep in taskdeps: | 1525 | for dep in taskdeps: |
1526 | (mc, fn, taskname, _) = split_tid_mcfn(dep) | 1526 | (mc, fn, taskname, taskfn) = split_tid_mcfn(dep) |
1527 | pn = self.rqdata.dataCaches[mc].pkg_fn[fn] | 1527 | pn = self.rqdata.dataCaches[mc].pkg_fn[taskfn] |
1528 | taskdata[dep] = [pn, taskname, fn] | 1528 | taskdata[dep] = [pn, taskname, fn] |
1529 | call = self.rq.depvalidate + "(task, taskdata, notneeded, d)" | 1529 | call = self.rq.depvalidate + "(task, taskdata, notneeded, d)" |
1530 | locs = { "task" : task, "taskdata" : taskdata, "notneeded" : self.scenequeue_notneeded, "d" : self.cooker.data } | 1530 | locs = { "task" : task, "taskdata" : taskdata, "notneeded" : self.scenequeue_notneeded, "d" : self.cooker.data } |
@@ -1724,7 +1724,7 @@ class RunQueueExecuteTasks(RunQueueExecute): | |||
1724 | 1724 | ||
1725 | # Check tasks that are going to run against the whitelist | 1725 | # Check tasks that are going to run against the whitelist |
1726 | def check_norun_task(tid, showerror=False): | 1726 | def check_norun_task(tid, showerror=False): |
1727 | (mc, fn, taskname, _) = split_tid_mcfn(tid) | 1727 | (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) |
1728 | # Ignore covered tasks | 1728 | # Ignore covered tasks |
1729 | if tid in self.rq.scenequeue_covered: | 1729 | if tid in self.rq.scenequeue_covered: |
1730 | return False | 1730 | return False |
@@ -1732,11 +1732,11 @@ class RunQueueExecuteTasks(RunQueueExecute): | |||
1732 | if self.rq.check_stamp_task(tid, taskname, cache=self.stampcache): | 1732 | if self.rq.check_stamp_task(tid, taskname, cache=self.stampcache): |
1733 | return False | 1733 | return False |
1734 | # Ignore noexec tasks | 1734 | # Ignore noexec tasks |
1735 | taskdep = self.rqdata.dataCaches[mc].task_deps[fn] | 1735 | taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn] |
1736 | if 'noexec' in taskdep and taskname in taskdep['noexec']: | 1736 | if 'noexec' in taskdep and taskname in taskdep['noexec']: |
1737 | return False | 1737 | return False |
1738 | 1738 | ||
1739 | pn = self.rqdata.dataCaches[mc].pkg_fn[fn] | 1739 | pn = self.rqdata.dataCaches[mc].pkg_fn[taskfn] |
1740 | if not check_setscene_enforce_whitelist(pn, taskname, self.rqdata.setscenewhitelist): | 1740 | if not check_setscene_enforce_whitelist(pn, taskname, self.rqdata.setscenewhitelist): |
1741 | if showerror: | 1741 | if showerror: |
1742 | if tid in self.rqdata.runq_setscene_tids: | 1742 | if tid in self.rqdata.runq_setscene_tids: |
@@ -1996,8 +1996,8 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
1996 | # e.g. do_sometask_setscene[depends] = "targetname:do_someothertask_setscene" | 1996 | # e.g. do_sometask_setscene[depends] = "targetname:do_someothertask_setscene" |
1997 | # Note that anything explicitly depended upon will have its reverse dependencies removed to avoid circular dependencies | 1997 | # Note that anything explicitly depended upon will have its reverse dependencies removed to avoid circular dependencies |
1998 | for tid in self.rqdata.runq_setscene_tids: | 1998 | for tid in self.rqdata.runq_setscene_tids: |
1999 | (mc, fn, taskname, _) = split_tid_mcfn(tid) | 1999 | (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) |
2000 | realtid = fn + ":" + taskname + "_setscene" | 2000 | realtid = tid + "_setscene" |
2001 | idepends = self.rqdata.taskData[mc].taskentries[realtid].idepends | 2001 | idepends = self.rqdata.taskData[mc].taskentries[realtid].idepends |
2002 | for (depname, idependtask) in idepends: | 2002 | for (depname, idependtask) in idepends: |
2003 | 2003 | ||
@@ -2062,7 +2062,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
2062 | for tid in self.sq_revdeps: | 2062 | for tid in self.sq_revdeps: |
2063 | (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) | 2063 | (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) |
2064 | 2064 | ||
2065 | taskdep = self.rqdata.dataCaches[mc].task_deps[fn] | 2065 | taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn] |
2066 | 2066 | ||
2067 | if 'noexec' in taskdep and taskname in taskdep['noexec']: | 2067 | if 'noexec' in taskdep and taskname in taskdep['noexec']: |
2068 | noexec.append(tid) | 2068 | noexec.append(tid) |
@@ -2083,7 +2083,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
2083 | continue | 2083 | continue |
2084 | 2084 | ||
2085 | sq_fn.append(fn) | 2085 | sq_fn.append(fn) |
2086 | sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[fn]) | 2086 | sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[taskfn]) |
2087 | sq_hash.append(self.rqdata.runtaskentries[tid].hash) | 2087 | sq_hash.append(self.rqdata.runtaskentries[tid].hash) |
2088 | sq_taskname.append(taskname) | 2088 | sq_taskname.append(taskname) |
2089 | sq_task.append(tid) | 2089 | sq_task.append(tid) |
@@ -2131,8 +2131,8 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
2131 | def check_taskfail(self, task): | 2131 | def check_taskfail(self, task): |
2132 | if self.rqdata.setscenewhitelist: | 2132 | if self.rqdata.setscenewhitelist: |
2133 | realtask = task.split('_setscene')[0] | 2133 | realtask = task.split('_setscene')[0] |
2134 | (mc, fn, taskname, _) = split_tid_mcfn(realtask) | 2134 | (mc, fn, taskname, taskfn) = split_tid_mcfn(realtask) |
2135 | pn = self.rqdata.dataCaches[mc].pkg_fn[fn] | 2135 | pn = self.rqdata.dataCaches[mc].pkg_fn[taskfn] |
2136 | if not check_setscene_enforce_whitelist(pn, taskname, self.rqdata.setscenewhitelist): | 2136 | if not check_setscene_enforce_whitelist(pn, taskname, self.rqdata.setscenewhitelist): |
2137 | logger.error('Task %s.%s failed' % (pn, taskname + "_setscene")) | 2137 | logger.error('Task %s.%s failed' % (pn, taskname + "_setscene")) |
2138 | self.rq.state = runQueueCleanUp | 2138 | self.rq.state = runQueueCleanUp |
@@ -2262,7 +2262,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
2262 | def getsetscenedeps(tid): | 2262 | def getsetscenedeps(tid): |
2263 | deps = set() | 2263 | deps = set() |
2264 | (mc, fn, taskname, _) = split_tid_mcfn(tid) | 2264 | (mc, fn, taskname, _) = split_tid_mcfn(tid) |
2265 | realtid = fn + ":" + taskname + "_setscene" | 2265 | realtid = tid + "_setscene" |
2266 | idepends = self.rqdata.taskData[mc].taskentries[realtid].idepends | 2266 | idepends = self.rqdata.taskData[mc].taskentries[realtid].idepends |
2267 | for (depname, idependtask) in idepends: | 2267 | for (depname, idependtask) in idepends: |
2268 | if depname not in self.rqdata.taskData[mc].build_targets: | 2268 | if depname not in self.rqdata.taskData[mc].build_targets: |