diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-07-21 22:39:58 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-07-21 22:39:58 +0100 |
commit | 94fe172d52286927638f7466b89f4eef4036e06b (patch) | |
tree | 23c188847c41e9ebfc2a66e9045b9ae6b82dae92 /bitbake-dev/lib/bb/runqueue.py | |
parent | fa5d458526716a047a70dc89dbce7bea2c8179bb (diff) | |
download | poky-94fe172d52286927638f7466b89f4eef4036e06b.tar.gz |
bitbake-dev: Catch up with bitbake changes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake-dev/lib/bb/runqueue.py')
-rw-r--r-- | bitbake-dev/lib/bb/runqueue.py | 72 |
1 files changed, 37 insertions, 35 deletions
diff --git a/bitbake-dev/lib/bb/runqueue.py b/bitbake-dev/lib/bb/runqueue.py index 1be2aa0db2..734f07d4cf 100644 --- a/bitbake-dev/lib/bb/runqueue.py +++ b/bitbake-dev/lib/bb/runqueue.py | |||
@@ -364,6 +364,33 @@ class RunQueue: | |||
364 | # process is repeated for each type of dependency (tdepends, deptask, | 364 | # process is repeated for each type of dependency (tdepends, deptask, |
365 | # rdeptast, recrdeptask, idepends). | 365 | # rdeptast, recrdeptask, idepends). |
366 | 366 | ||
367 | def add_build_dependencies(depids, tasknames, depends): | ||
368 | for depid in depids: | ||
369 | # Won't be in build_targets if ASSUME_PROVIDED | ||
370 | if depid not in taskData.build_targets: | ||
371 | continue | ||
372 | depdata = taskData.build_targets[depid][0] | ||
373 | if depdata is None: | ||
374 | continue | ||
375 | dep = taskData.fn_index[depdata] | ||
376 | for taskname in tasknames: | ||
377 | taskid = taskData.gettask_id(dep, taskname, False) | ||
378 | if taskid is not None: | ||
379 | depends.append(taskid) | ||
380 | |||
381 | def add_runtime_dependencies(depids, tasknames, depends): | ||
382 | for depid in depids: | ||
383 | if depid not in taskData.run_targets: | ||
384 | continue | ||
385 | depdata = taskData.run_targets[depid][0] | ||
386 | if depdata is None: | ||
387 | continue | ||
388 | dep = taskData.fn_index[depdata] | ||
389 | for taskname in tasknames: | ||
390 | taskid = taskData.gettask_id(dep, taskname, False) | ||
391 | if taskid is not None: | ||
392 | depends.append(taskid) | ||
393 | |||
367 | for task in range(len(taskData.tasks_name)): | 394 | for task in range(len(taskData.tasks_name)): |
368 | depends = [] | 395 | depends = [] |
369 | recrdepends = [] | 396 | recrdepends = [] |
@@ -386,14 +413,7 @@ class RunQueue: | |||
386 | # (makes sure sometask runs after someothertask of all DEPENDS) | 413 | # (makes sure sometask runs after someothertask of all DEPENDS) |
387 | if 'deptask' in task_deps and taskData.tasks_name[task] in task_deps['deptask']: | 414 | if 'deptask' in task_deps and taskData.tasks_name[task] in task_deps['deptask']: |
388 | tasknames = task_deps['deptask'][taskData.tasks_name[task]].split() | 415 | tasknames = task_deps['deptask'][taskData.tasks_name[task]].split() |
389 | for depid in taskData.depids[fnid]: | 416 | add_build_dependencies(taskData.depids[fnid], tasknames, depends) |
390 | # Won't be in build_targets if ASSUME_PROVIDED | ||
391 | if depid in taskData.build_targets: | ||
392 | depdata = taskData.build_targets[depid][0] | ||
393 | if depdata is not None: | ||
394 | dep = taskData.fn_index[depdata] | ||
395 | for taskname in tasknames: | ||
396 | depends.append(taskData.gettask_id(dep, taskname)) | ||
397 | 417 | ||
398 | # Resolve 'rdeptask' dependencies | 418 | # Resolve 'rdeptask' dependencies |
399 | # | 419 | # |
@@ -401,12 +421,7 @@ class RunQueue: | |||
401 | # (makes sure sometask runs after someothertask of all RDEPENDS) | 421 | # (makes sure sometask runs after someothertask of all RDEPENDS) |
402 | if 'rdeptask' in task_deps and taskData.tasks_name[task] in task_deps['rdeptask']: | 422 | if 'rdeptask' in task_deps and taskData.tasks_name[task] in task_deps['rdeptask']: |
403 | taskname = task_deps['rdeptask'][taskData.tasks_name[task]] | 423 | taskname = task_deps['rdeptask'][taskData.tasks_name[task]] |
404 | for depid in taskData.rdepids[fnid]: | 424 | add_runtime_dependencies(taskData.rdepids[fnid], [taskname], depends) |
405 | if depid in taskData.run_targets: | ||
406 | depdata = taskData.run_targets[depid][0] | ||
407 | if depdata is not None: | ||
408 | dep = taskData.fn_index[depdata] | ||
409 | depends.append(taskData.gettask_id(dep, taskname)) | ||
410 | 425 | ||
411 | # Resolve inter-task dependencies | 426 | # Resolve inter-task dependencies |
412 | # | 427 | # |
@@ -435,23 +450,8 @@ class RunQueue: | |||
435 | if 'recrdeptask' in task_deps and taskData.tasks_name[task] in task_deps['recrdeptask']: | 450 | if 'recrdeptask' in task_deps and taskData.tasks_name[task] in task_deps['recrdeptask']: |
436 | for taskname in task_deps['recrdeptask'][taskData.tasks_name[task]].split(): | 451 | for taskname in task_deps['recrdeptask'][taskData.tasks_name[task]].split(): |
437 | recrdepends.append(taskname) | 452 | recrdepends.append(taskname) |
438 | for depid in taskData.rdepids[fnid]: | 453 | add_build_dependencies(taskData.depids[fnid], [taskname], depends) |
439 | if depid in taskData.run_targets: | 454 | add_runtime_dependencies(taskData.rdepids[fnid], [taskname], depends) |
440 | depdata = taskData.run_targets[depid][0] | ||
441 | if depdata is not None: | ||
442 | dep = taskData.fn_index[depdata] | ||
443 | taskid = taskData.gettask_id(dep, taskname, False) | ||
444 | if taskid is not None: | ||
445 | depends.append(taskid) | ||
446 | for depid in taskData.depids[fnid]: | ||
447 | # Won't be in build_targets if ASSUME_PROVIDED | ||
448 | if depid in taskData.build_targets: | ||
449 | depdata = taskData.build_targets[depid][0] | ||
450 | if depdata is not None: | ||
451 | dep = taskData.fn_index[depdata] | ||
452 | taskid = taskData.gettask_id(dep, taskname, False) | ||
453 | if taskid is not None: | ||
454 | depends.append(taskid) | ||
455 | 455 | ||
456 | # Rmove all self references | 456 | # Rmove all self references |
457 | if task in depends: | 457 | if task in depends: |
@@ -483,10 +483,9 @@ class RunQueue: | |||
483 | fnid = self.runq_fnid[task] | 483 | fnid = self.runq_fnid[task] |
484 | if fnid not in reccumdepends: | 484 | if fnid not in reccumdepends: |
485 | reccumdepends[fnid] = set() | 485 | reccumdepends[fnid] = set() |
486 | if task in self.runq_depends: | 486 | if fnid in tdepends_fnid: |
487 | reccumdepends[fnid].update(self.runq_depends[task]) | 487 | reccumdepends[fnid].update(tdepends_fnid[fnid]) |
488 | if fnid in tdepends_fnid: | 488 | reccumdepends[fnid].update(self.runq_depends[task]) |
489 | reccumdepends[fnid].update(tdepends_fnid[fnid]) | ||
490 | for task in range(len(self.runq_fnid)): | 489 | for task in range(len(self.runq_fnid)): |
491 | taskfnid = self.runq_fnid[task] | 490 | taskfnid = self.runq_fnid[task] |
492 | for fnid in reccumdepends: | 491 | for fnid in reccumdepends: |
@@ -504,6 +503,9 @@ class RunQueue: | |||
504 | if len(runq_recrdepends[task]) > 0: | 503 | if len(runq_recrdepends[task]) > 0: |
505 | taskfnid = self.runq_fnid[task] | 504 | taskfnid = self.runq_fnid[task] |
506 | for dep in reccumdepends[taskfnid]: | 505 | for dep in reccumdepends[taskfnid]: |
506 | # Ignore self references | ||
507 | if dep == task: | ||
508 | continue | ||
507 | for taskname in runq_recrdepends[task]: | 509 | for taskname in runq_recrdepends[task]: |
508 | if taskData.tasks_name[dep] == taskname: | 510 | if taskData.tasks_name[dep] == taskname: |
509 | self.runq_depends[task].add(dep) | 511 | self.runq_depends[task].add(dep) |