diff options
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/build.py | 1 | ||||
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 14 | ||||
-rw-r--r-- | bitbake/lib/bb/taskdata.py | 16 |
3 files changed, 30 insertions, 1 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index a0a7dd4e12..2cb7a9301b 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -543,6 +543,7 @@ def add_tasks(tasklist, d): | |||
543 | deptask = data.expand(flags[name], d) | 543 | deptask = data.expand(flags[name], d) |
544 | task_deps[name][task] = deptask | 544 | task_deps[name][task] = deptask |
545 | getTask('depends') | 545 | getTask('depends') |
546 | getTask('rdepends') | ||
546 | getTask('deptask') | 547 | getTask('deptask') |
547 | getTask('rdeptask') | 548 | getTask('rdeptask') |
548 | getTask('recrdeptask') | 549 | getTask('recrdeptask') |
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index bd643ea767..03766adfea 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -476,7 +476,19 @@ class RunQueueData: | |||
476 | depends.append(taskid) | 476 | depends.append(taskid) |
477 | if depdata != fnid: | 477 | if depdata != fnid: |
478 | tdepends_fnid[fnid].add(taskid) | 478 | tdepends_fnid[fnid].add(taskid) |
479 | 479 | irdepends = taskData.tasks_irdepends[task] | |
480 | for (depid, idependtask) in irdepends: | ||
481 | if depid in taskData.run_targets: | ||
482 | # Won't be in run_targets if ASSUME_PROVIDED | ||
483 | depdata = taskData.run_targets[depid][0] | ||
484 | if depdata is not None: | ||
485 | dep = taskData.fn_index[depdata] | ||
486 | taskid = taskData.gettask_id(dep, idependtask, False) | ||
487 | if taskid is None: | ||
488 | bb.msg.fatal("RunQueue", "Task %s in %s rdepends upon non-existent task %s in %s" % (taskData.tasks_name[task], fn, idependtask, dep)) | ||
489 | depends.append(taskid) | ||
490 | if depdata != fnid: | ||
491 | tdepends_fnid[fnid].add(taskid) | ||
480 | 492 | ||
481 | # Resolve recursive 'recrdeptask' dependencies (A) | 493 | # Resolve recursive 'recrdeptask' dependencies (A) |
482 | # | 494 | # |
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py index ee1a7232dd..8bc447c11c 100644 --- a/bitbake/lib/bb/taskdata.py +++ b/bitbake/lib/bb/taskdata.py | |||
@@ -55,6 +55,7 @@ class TaskData: | |||
55 | self.tasks_name = [] | 55 | self.tasks_name = [] |
56 | self.tasks_tdepends = [] | 56 | self.tasks_tdepends = [] |
57 | self.tasks_idepends = [] | 57 | self.tasks_idepends = [] |
58 | self.tasks_irdepends = [] | ||
58 | # Cache to speed up task ID lookups | 59 | # Cache to speed up task ID lookups |
59 | self.tasks_lookup = {} | 60 | self.tasks_lookup = {} |
60 | 61 | ||
@@ -134,6 +135,7 @@ class TaskData: | |||
134 | self.tasks_fnid.append(fnid) | 135 | self.tasks_fnid.append(fnid) |
135 | self.tasks_tdepends.append([]) | 136 | self.tasks_tdepends.append([]) |
136 | self.tasks_idepends.append([]) | 137 | self.tasks_idepends.append([]) |
138 | self.tasks_irdepends.append([]) | ||
137 | 139 | ||
138 | listid = len(self.tasks_name) - 1 | 140 | listid = len(self.tasks_name) - 1 |
139 | 141 | ||
@@ -178,6 +180,15 @@ class TaskData: | |||
178 | bb.msg.fatal("TaskData", "Error for %s, dependency %s does not contain ':' character\n. Task 'depends' should be specified in the form 'packagename:task'" % (fn, dep)) | 180 | bb.msg.fatal("TaskData", "Error for %s, dependency %s does not contain ':' character\n. Task 'depends' should be specified in the form 'packagename:task'" % (fn, dep)) |
179 | ids.append(((self.getbuild_id(dep.split(":")[0])), dep.split(":")[1])) | 181 | ids.append(((self.getbuild_id(dep.split(":")[0])), dep.split(":")[1])) |
180 | self.tasks_idepends[taskid].extend(ids) | 182 | self.tasks_idepends[taskid].extend(ids) |
183 | if 'rdepends' in task_deps and task in task_deps['rdepends']: | ||
184 | ids = [] | ||
185 | for dep in task_deps['rdepends'][task].split(): | ||
186 | if dep: | ||
187 | if ":" not in dep: | ||
188 | bb.msg.fatal("TaskData", "Error for %s, dependency %s does not contain ':' character\n. Task 'rdepends' should be specified in the form 'packagename:task'" % (fn, dep)) | ||
189 | ids.append(((self.getrun_id(dep.split(":")[0])), dep.split(":")[1])) | ||
190 | self.tasks_irdepends[taskid].extend(ids) | ||
191 | |||
181 | 192 | ||
182 | # Work out build dependencies | 193 | # Work out build dependencies |
183 | if not fnid in self.depids: | 194 | if not fnid in self.depids: |
@@ -533,6 +544,11 @@ class TaskData: | |||
533 | dependees = self.get_rdependees(targetid) | 544 | dependees = self.get_rdependees(targetid) |
534 | for fnid in dependees: | 545 | for fnid in dependees: |
535 | self.fail_fnid(fnid, missing_list) | 546 | self.fail_fnid(fnid, missing_list) |
547 | for taskid in xrange(len(self.tasks_irdepends)): | ||
548 | irdepends = self.tasks_irdepends[taskid] | ||
549 | for (idependid, idependtask) in irdepends: | ||
550 | if idependid == targetid: | ||
551 | self.fail_fnid(self.tasks_fnid[taskid], missing_list) | ||
536 | 552 | ||
537 | def add_unresolved(self, cfgData, dataCache): | 553 | def add_unresolved(self, cfgData, dataCache): |
538 | """ | 554 | """ |