diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 2f204aea97..20187f3219 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -345,6 +345,33 @@ class RunQueue: # process is repeated for each type of dependency (tdepends, deptask, # rdeptast, recrdeptask, idepends). + def add_build_dependencies(depids, tasknames, depends): + for depid in depids: + # Won't be in build_targets if ASSUME_PROVIDED + if depid not in taskData.build_targets: + continue + depdata = taskData.build_targets[depid][0] + if depdata is None: + continue + dep = taskData.fn_index[depdata] + for taskname in tasknames: + taskid = taskData.gettask_id(dep, taskname, False) + if taskid is not None: + depends.append(taskid) + + def add_runtime_dependencies(depids, tasknames, depends): + for depid in depids: + if depid not in taskData.run_targets: + continue + depdata = taskData.run_targets[depid][0] + if depdata is None: + continue + dep = taskData.fn_index[depdata] + for taskname in tasknames: + taskid = taskData.gettask_id(dep, taskname, False) + if taskid is not None: + depends.append(taskid) + for task in range(len(taskData.tasks_name)): depends = [] recrdepends = [] @@ -367,14 +394,7 @@ class RunQueue: # (makes sure sometask runs after someothertask of all DEPENDS) if 'deptask' in task_deps and taskData.tasks_name[task] in task_deps['deptask']: tasknames = task_deps['deptask'][taskData.tasks_name[task]].split() - for depid in taskData.depids[fnid]: - # Won't be in build_targets if ASSUME_PROVIDED - if depid in taskData.build_targets: - depdata = taskData.build_targets[depid][0] - if depdata is not None: - dep = taskData.fn_index[depdata] - for taskname in tasknames: - depends.append(taskData.gettask_id(dep, taskname)) + add_build_dependencies(taskData.depids[fnid], tasknames, depends) # Resolve 'rdeptask' dependencies # @@ -382,12 +402,7 @@ class RunQueue: # (makes sure sometask runs after someothertask of all RDEPENDS) if 'rdeptask' in task_deps and taskData.tasks_name[task] in task_deps['rdeptask']: taskname = task_deps['rdeptask'][taskData.tasks_name[task]] - for depid in taskData.rdepids[fnid]: - if depid in taskData.run_targets: - depdata = taskData.run_targets[depid][0] - if depdata is not None: - dep = taskData.fn_index[depdata] - depends.append(taskData.gettask_id(dep, taskname)) + add_runtime_dependencies(taskData.rdepids[fnid], [taskname], depends) # Resolve inter-task dependencies # @@ -416,23 +431,8 @@ class RunQueue: if 'recrdeptask' in task_deps and taskData.tasks_name[task] in task_deps['recrdeptask']: for taskname in task_deps['recrdeptask'][taskData.tasks_name[task]].split(): recrdepends.append(taskname) - for depid in taskData.rdepids[fnid]: - if depid in taskData.run_targets: - depdata = taskData.run_targets[depid][0] - if depdata is not None: - dep = taskData.fn_index[depdata] - taskid = taskData.gettask_id(dep, taskname, False) - if taskid is not None: - depends.append(taskid) - for depid in taskData.depids[fnid]: - # Won't be in build_targets if ASSUME_PROVIDED - if depid in taskData.build_targets: - depdata = taskData.build_targets[depid][0] - if depdata is not None: - dep = taskData.fn_index[depdata] - taskid = taskData.gettask_id(dep, taskname, False) - if taskid is not None: - depends.append(taskid) + add_build_dependencies(taskData.depids[fnid], [taskname], depends) + add_runtime_dependencies(taskData.rdepids[fnid], [taskname], depends) # Rmove all self references if task in depends: |