summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/taskdata.py
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-01-20 12:09:31 +0000
committerRichard Purdie <richard@openedhand.com>2008-01-20 12:09:31 +0000
commit079e6825aacec7ef9b3976c9057363b690a43ce5 (patch)
treeb25054c486e11d0b293e2166f1c4cdce02eb8704 /bitbake/lib/bb/taskdata.py
parent027c071fc5fbaed003d17e1d385008a5b70ee3eb (diff)
downloadpoky-079e6825aacec7ef9b3976c9057363b690a43ce5.tar.gz
bitbake: sync with upstream stable branch bugfixes and enhancements
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3554 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/taskdata.py')
-rw-r--r--bitbake/lib/bb/taskdata.py41
1 files changed, 26 insertions, 15 deletions
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index 74a8b84bd5..3dac6c26af 100644
--- a/bitbake/lib/bb/taskdata.py
+++ b/bitbake/lib/bb/taskdata.py
@@ -330,7 +330,7 @@ class TaskData:
330 self.add_provider_internal(cfgData, dataCache, item) 330 self.add_provider_internal(cfgData, dataCache, item)
331 except bb.providers.NoProvider: 331 except bb.providers.NoProvider:
332 if self.abort: 332 if self.abort:
333 bb.msg.error(bb.msg.domain.Provider, "No providers of build target %s (for %s)" % (item, self.get_dependees_str(item))) 333 bb.msg.error(bb.msg.domain.Provider, "Nothing PROVIDES '%s' (but '%s' DEPENDS on or otherwise requires it)" % (item, self.get_dependees_str(item)))
334 raise 334 raise
335 targetid = self.getbuild_id(item) 335 targetid = self.getbuild_id(item)
336 self.remove_buildtarget(targetid) 336 self.remove_buildtarget(targetid)
@@ -348,7 +348,7 @@ class TaskData:
348 return 348 return
349 349
350 if not item in dataCache.providers: 350 if not item in dataCache.providers:
351 bb.msg.note(2, bb.msg.domain.Provider, "No providers of build target %s (for %s)" % (item, self.get_dependees_str(item))) 351 bb.msg.note(2, bb.msg.domain.Provider, "Nothing PROVIDES '%s' (but '%s' DEPENDS on or otherwise requires it)" % (item, self.get_dependees_str(item)))
352 bb.event.fire(bb.event.NoProvider(item, cfgData)) 352 bb.event.fire(bb.event.NoProvider(item, cfgData))
353 raise bb.providers.NoProvider(item) 353 raise bb.providers.NoProvider(item)
354 354
@@ -365,7 +365,7 @@ class TaskData:
365 eligible.remove(p) 365 eligible.remove(p)
366 366
367 if not eligible: 367 if not eligible:
368 bb.msg.note(2, bb.msg.domain.Provider, "No providers of build target %s after filtering (for %s)" % (item, self.get_dependees_str(item))) 368 bb.msg.note(2, bb.msg.domain.Provider, "No buildable provider PROVIDES '%s' but '%s' DEPENDS on or otherwise requires it. Enable debugging and see earlier logs to find unbuildable providers." % (item, self.get_dependees_str(item)))
369 bb.event.fire(bb.event.NoProvider(item, cfgData)) 369 bb.event.fire(bb.event.NoProvider(item, cfgData))
370 raise bb.providers.NoProvider(item) 370 raise bb.providers.NoProvider(item)
371 371
@@ -376,7 +376,7 @@ class TaskData:
376 providers_list.append(dataCache.pkg_fn[fn]) 376 providers_list.append(dataCache.pkg_fn[fn])
377 bb.msg.note(1, bb.msg.domain.Provider, "multiple providers are available for %s (%s);" % (item, ", ".join(providers_list))) 377 bb.msg.note(1, bb.msg.domain.Provider, "multiple providers are available for %s (%s);" % (item, ", ".join(providers_list)))
378 bb.msg.note(1, bb.msg.domain.Provider, "consider defining PREFERRED_PROVIDER_%s" % item) 378 bb.msg.note(1, bb.msg.domain.Provider, "consider defining PREFERRED_PROVIDER_%s" % item)
379 bb.event.fire(bb.event.MultipleProviders(item,providers_list,cfgData)) 379 bb.event.fire(bb.event.MultipleProviders(item, providers_list, cfgData))
380 self.consider_msgs_cache.append(item) 380 self.consider_msgs_cache.append(item)
381 381
382 for fn in eligible: 382 for fn in eligible:
@@ -405,7 +405,7 @@ class TaskData:
405 all_p = bb.providers.getRuntimeProviders(dataCache, item) 405 all_p = bb.providers.getRuntimeProviders(dataCache, item)
406 406
407 if not all_p: 407 if not all_p:
408 bb.msg.error(bb.msg.domain.Provider, "No providers of runtime build target %s (for %s)" % (item, self.get_rdependees_str(item))) 408 bb.msg.error(bb.msg.domain.Provider, "'%s' RDEPENDS/RRECOMMENDS or otherwise requires the runtime entity '%s' but it wasn't found in any PACKAGE or RPROVIDES variables" % (self.get_rdependees_str(item), item))
409 bb.event.fire(bb.event.NoProvider(item, cfgData, runtime=True)) 409 bb.event.fire(bb.event.NoProvider(item, cfgData, runtime=True))
410 raise bb.providers.NoRProvider(item) 410 raise bb.providers.NoRProvider(item)
411 411
@@ -417,7 +417,7 @@ class TaskData:
417 eligible.remove(p) 417 eligible.remove(p)
418 418
419 if not eligible: 419 if not eligible:
420 bb.msg.error(bb.msg.domain.Provider, "No providers of runtime build target %s after filtering (for %s)" % (item, self.get_rdependees_str(item))) 420 bb.msg.error(bb.msg.domain.Provider, "'%s' RDEPENDS/RRECOMMENDS or otherwise requires the runtime entity '%s' but it wasn't found in any PACKAGE or RPROVIDES variables of any buildable targets.\nEnable debugging and see earlier logs to find unbuildable targets." % (self.get_rdependees_str(item), item))
421 bb.event.fire(bb.event.NoProvider(item, cfgData, runtime=True)) 421 bb.event.fire(bb.event.NoProvider(item, cfgData, runtime=True))
422 raise bb.providers.NoRProvider(item) 422 raise bb.providers.NoRProvider(item)
423 423
@@ -446,7 +446,7 @@ class TaskData:
446 fnid = self.getfn_id(fn) 446 fnid = self.getfn_id(fn)
447 if fnid in self.failed_fnids: 447 if fnid in self.failed_fnids:
448 continue 448 continue
449 bb.msg.debug(2, bb.msg.domain.Provider, "adding %s to satisfy runtime %s" % (fn, item)) 449 bb.msg.debug(2, bb.msg.domain.Provider, "adding '%s' to satisfy runtime '%s'" % (fn, item))
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
@@ -459,7 +459,9 @@ class TaskData:
459 """ 459 """
460 if fnid in self.failed_fnids: 460 if fnid in self.failed_fnids:
461 return 461 return
462 bb.msg.debug(1, bb.msg.domain.Provider, "Removing failed file %s" % self.fn_index[fnid]) 462 if not missing_list:
463 missing_list = [fnid]
464 bb.msg.debug(1, bb.msg.domain.Provider, "File '%s' is unbuildable, removing..." % self.fn_index[fnid])
463 self.failed_fnids.append(fnid) 465 self.failed_fnids.append(fnid)
464 for target in self.build_targets: 466 for target in self.build_targets:
465 if fnid in self.build_targets[target]: 467 if fnid in self.build_targets[target]:
@@ -477,13 +479,17 @@ class TaskData:
477 Mark a build target as failed (unbuildable) 479 Mark a build target as failed (unbuildable)
478 Trigger removal of any files that have this as a dependency 480 Trigger removal of any files that have this as a dependency
479 """ 481 """
480 bb.msg.note(2, bb.msg.domain.Provider, "Removing failed build target %s" % self.build_names_index[targetid]) 482 if not missing_list:
483 missing_list = [self.build_names_index[targetid]]
484 else:
485 missing_list = [self.build_names_index[targetid]] + missing_list
486 bb.msg.note(2, bb.msg.domain.Provider, "Target '%s' is unbuildable, removing...\nMissing or unbuildable dependency chain was: %s" % (self.build_names_index[targetid], missing_list))
481 self.failed_deps.append(targetid) 487 self.failed_deps.append(targetid)
482 dependees = self.get_dependees(targetid) 488 dependees = self.get_dependees(targetid)
483 for fnid in dependees: 489 for fnid in dependees:
484 self.fail_fnid(fnid, [self.build_names_index[targetid]]+missing_list) 490 self.fail_fnid(fnid, missing_list)
485 if self.abort and targetid in self.external_targets: 491 if self.abort and targetid in self.external_targets:
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)) 492 bb.msg.error(bb.msg.domain.Provider, "Required build target '%s' has no buildable providers.\nMissing or unbuildable dependency chain was: %s" % (self.build_names_index[targetid], missing_list))
487 raise bb.providers.NoProvider 493 raise bb.providers.NoProvider
488 494
489 def remove_runtarget(self, targetid, missing_list = []): 495 def remove_runtarget(self, targetid, missing_list = []):
@@ -491,17 +497,22 @@ class TaskData:
491 Mark a run target as failed (unbuildable) 497 Mark a run target as failed (unbuildable)
492 Trigger removal of any files that have this as a dependency 498 Trigger removal of any files that have this as a dependency
493 """ 499 """
494 bb.msg.note(1, bb.msg.domain.Provider, "Removing failed runtime build target %s ('%s')" % (self.run_names_index[targetid], missing_list)) 500 if not missing_list:
501 missing_list = [self.run_names_index[targetid]]
502 else:
503 missing_list = [self.run_names_index[targetid]] + missing_list
504
505 bb.msg.note(1, bb.msg.domain.Provider, "Runtime target '%s' is unbuildable, removing...\nMissing or unbuildable dependency chain was: %s" % (self.run_names_index[targetid], missing_list))
495 self.failed_rdeps.append(targetid) 506 self.failed_rdeps.append(targetid)
496 dependees = self.get_rdependees(targetid) 507 dependees = self.get_rdependees(targetid)
497 for fnid in dependees: 508 for fnid in dependees:
498 self.fail_fnid(fnid, [self.run_names_index[targetid]]+missing_list) 509 self.fail_fnid(fnid, missing_list)
499 510
500 def add_unresolved(self, cfgData, dataCache): 511 def add_unresolved(self, cfgData, dataCache):
501 """ 512 """
502 Resolve all unresolved build and runtime targets 513 Resolve all unresolved build and runtime targets
503 """ 514 """
504 bb.msg.note(1, bb.msg.domain.TaskData, "Resolving missing task queue dependencies") 515 bb.msg.note(1, bb.msg.domain.TaskData, "Resolving any missing task queue dependencies")
505 while 1: 516 while 1:
506 added = 0 517 added = 0
507 for target in self.get_unresolved_build_targets(dataCache): 518 for target in self.get_unresolved_build_targets(dataCache):
@@ -511,7 +522,7 @@ class TaskData:
511 except bb.providers.NoProvider: 522 except bb.providers.NoProvider:
512 targetid = self.getbuild_id(target) 523 targetid = self.getbuild_id(target)
513 if self.abort and targetid in self.external_targets: 524 if self.abort and targetid in self.external_targets:
514 bb.msg.error(bb.msg.domain.Provider, "No providers of build target %s (for %s)" % (target, self.get_dependees_str(target))) 525 bb.msg.error(bb.msg.domain.Provider, "Nothing PROVIDES '%s' (but '%s' DEPENDS on or otherwise requires it)" % (target, self.get_dependees_str(target)))
515 raise 526 raise
516 self.remove_buildtarget(targetid) 527 self.remove_buildtarget(targetid)
517 for target in self.get_unresolved_run_targets(dataCache): 528 for target in self.get_unresolved_run_targets(dataCache):