summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/taskdata.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/taskdata.py')
-rw-r--r--bitbake/lib/bb/taskdata.py41
1 files changed, 28 insertions, 13 deletions
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index f448b5b666..902cc140ef 100644
--- a/bitbake/lib/bb/taskdata.py
+++ b/bitbake/lib/bb/taskdata.py
@@ -450,10 +450,12 @@ class TaskData:
450 self.add_runtime_target(fn, item) 450 self.add_runtime_target(fn, item)
451 self.add_tasks(fn, dataCache) 451 self.add_tasks(fn, dataCache)
452 452
453 def fail_fnid(self, fnid): 453 def fail_fnid(self, fnid, missing_list = []):
454 """ 454 """
455 Mark a file as failed (unbuildable) 455 Mark a file as failed (unbuildable)
456 Remove any references from build and runtime provider lists 456 Remove any references from build and runtime provider lists
457
458 missing_list, A list of missing requirements for this target
457 """ 459 """
458 if fnid in self.failed_fnids: 460 if fnid in self.failed_fnids:
459 return 461 return
@@ -463,14 +465,14 @@ class TaskData:
463 if fnid in self.build_targets[target]: 465 if fnid in self.build_targets[target]:
464 self.build_targets[target].remove(fnid) 466 self.build_targets[target].remove(fnid)
465 if len(self.build_targets[target]) == 0: 467 if len(self.build_targets[target]) == 0:
466 self.remove_buildtarget(target) 468 self.remove_buildtarget(target, missing_list)
467 for target in self.run_targets: 469 for target in self.run_targets:
468 if fnid in self.run_targets[target]: 470 if fnid in self.run_targets[target]:
469 self.run_targets[target].remove(fnid) 471 self.run_targets[target].remove(fnid)
470 if len(self.run_targets[target]) == 0: 472 if len(self.run_targets[target]) == 0:
471 self.remove_runtarget(target) 473 self.remove_runtarget(target, missing_list)
472 474
473 def remove_buildtarget(self, targetid): 475 def remove_buildtarget(self, targetid, missing_list = []):
474 """ 476 """
475 Mark a build target as failed (unbuildable) 477 Mark a build target as failed (unbuildable)
476 Trigger removal of any files that have this as a dependency 478 Trigger removal of any files that have this as a dependency
@@ -479,21 +481,21 @@ class TaskData:
479 self.failed_deps.append(targetid) 481 self.failed_deps.append(targetid)
480 dependees = self.get_dependees(targetid) 482 dependees = self.get_dependees(targetid)
481 for fnid in dependees: 483 for fnid in dependees:
482 self.fail_fnid(fnid) 484 self.fail_fnid(fnid, [self.build_names_index[targetid]]+missing_list)
483 if self.abort and targetid in self.external_targets: 485 if self.abort and targetid in self.external_targets:
484 bb.msg.error(bb.msg.domain.Provider, "No buildable providers available for required build target %s" % self.build_names_index[targetid]) 486 bb.msg.error(bb.msg.domain.Provider, "No buildable providers available for required build target %s ('%s')" % (self.build_names_index[targetid], missing_list))
485 raise bb.providers.NoProvider 487 raise bb.providers.NoProvider
486 488
487 def remove_runtarget(self, targetid): 489 def remove_runtarget(self, targetid, missing_list = []):
488 """ 490 """
489 Mark a run target as failed (unbuildable) 491 Mark a run target as failed (unbuildable)
490 Trigger removal of any files that have this as a dependency 492 Trigger removal of any files that have this as a dependency
491 """ 493 """
492 bb.msg.note(1, bb.msg.domain.Provider, "Removing failed runtime build target %s" % self.run_names_index[targetid]) 494 bb.msg.note(1, bb.msg.domain.Provider, "Removing failed runtime build target %s ('%s')" % (self.run_names_index[targetid], missing_list))
493 self.failed_rdeps.append(targetid) 495 self.failed_rdeps.append(targetid)
494 dependees = self.get_rdependees(targetid) 496 dependees = self.get_rdependees(targetid)
495 for fnid in dependees: 497 for fnid in dependees:
496 self.fail_fnid(fnid) 498 self.fail_fnid(fnid, [self.run_names_index[targetid]]+missing_list)
497 499
498 def add_unresolved(self, cfgData, dataCache): 500 def add_unresolved(self, cfgData, dataCache):
499 """ 501 """
@@ -529,14 +531,26 @@ class TaskData:
529 """ 531 """
530 bb.msg.debug(3, bb.msg.domain.TaskData, "build_names:") 532 bb.msg.debug(3, bb.msg.domain.TaskData, "build_names:")
531 bb.msg.debug(3, bb.msg.domain.TaskData, ", ".join(self.build_names_index)) 533 bb.msg.debug(3, bb.msg.domain.TaskData, ", ".join(self.build_names_index))
534
532 bb.msg.debug(3, bb.msg.domain.TaskData, "run_names:") 535 bb.msg.debug(3, bb.msg.domain.TaskData, "run_names:")
533 bb.msg.debug(3, bb.msg.domain.TaskData, ", ".join(self.run_names_index)) 536 bb.msg.debug(3, bb.msg.domain.TaskData, ", ".join(self.run_names_index))
537
534 bb.msg.debug(3, bb.msg.domain.TaskData, "build_targets:") 538 bb.msg.debug(3, bb.msg.domain.TaskData, "build_targets:")
535 for target in self.build_targets.keys(): 539 for buildid in range(len(self.build_names_index)):
536 bb.msg.debug(3, bb.msg.domain.TaskData, " %s: %s" % (self.build_names_index[target], self.build_targets[target])) 540 target = self.build_names_index[buildid]
541 targets = "None"
542 if buildid in self.build_targets:
543 targets = self.build_targets[buildid]
544 bb.msg.debug(3, bb.msg.domain.TaskData, " (%s)%s: %s" % (buildid, target, targets))
545
537 bb.msg.debug(3, bb.msg.domain.TaskData, "run_targets:") 546 bb.msg.debug(3, bb.msg.domain.TaskData, "run_targets:")
538 for target in self.run_targets.keys(): 547 for runid in range(len(self.run_names_index)):
539 bb.msg.debug(3, bb.msg.domain.TaskData, " %s: %s" % (self.run_names_index[target], self.run_targets[target])) 548 target = self.run_names_index[runid]
549 targets = "None"
550 if runid in self.run_targets:
551 targets = self.run_targets[runid]
552 bb.msg.debug(3, bb.msg.domain.TaskData, " (%s)%s: %s" % (runid, target, targets))
553
540 bb.msg.debug(3, bb.msg.domain.TaskData, "tasks:") 554 bb.msg.debug(3, bb.msg.domain.TaskData, "tasks:")
541 for task in range(len(self.tasks_name)): 555 for task in range(len(self.tasks_name)):
542 bb.msg.debug(3, bb.msg.domain.TaskData, " (%s)%s - %s: %s" % ( 556 bb.msg.debug(3, bb.msg.domain.TaskData, " (%s)%s - %s: %s" % (
@@ -544,6 +558,7 @@ class TaskData:
544 self.fn_index[self.tasks_fnid[task]], 558 self.fn_index[self.tasks_fnid[task]],
545 self.tasks_name[task], 559 self.tasks_name[task],
546 self.tasks_tdepends[task])) 560 self.tasks_tdepends[task]))
561
547 bb.msg.debug(3, bb.msg.domain.TaskData, "runtime ids (per fn):") 562 bb.msg.debug(3, bb.msg.domain.TaskData, "runtime ids (per fn):")
548 for fnid in self.rdepids: 563 for fnid in self.rdepids:
549 bb.msg.debug(3, bb.msg.domain.TaskData, " %s %s: %s" % (fnid, self.fn_index[fnid], self.rdepids[fnid])) 564 bb.msg.debug(3, bb.msg.domain.TaskData, " %s %s: %s" % (fnid, self.fn_index[fnid], self.rdepids[fnid]))