summaryrefslogtreecommitdiffstats
path: root/bitbake-dev/lib/bb/taskdata.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake-dev/lib/bb/taskdata.py')
-rw-r--r--bitbake-dev/lib/bb/taskdata.py35
1 files changed, 24 insertions, 11 deletions
diff --git a/bitbake-dev/lib/bb/taskdata.py b/bitbake-dev/lib/bb/taskdata.py
index 73ec2aa750..e3a60b9884 100644
--- a/bitbake-dev/lib/bb/taskdata.py
+++ b/bitbake-dev/lib/bb/taskdata.py
@@ -25,6 +25,19 @@ Task data collection and handling
25 25
26import bb 26import bb
27 27
28def re_match_strings(target, strings):
29 """
30 Whether or not the string 'target' matches
31 any one string of the strings which can be regular expression string
32 """
33 import re
34
35 for name in strings:
36 if (name==target or
37 re.search(name,target)!=None):
38 return True
39 return False
40
28class TaskData: 41class TaskData:
29 """ 42 """
30 BitBake Task Data implementation 43 BitBake Task Data implementation
@@ -261,7 +274,7 @@ class TaskData:
261 """ 274 """
262 unresolved = [] 275 unresolved = []
263 for target in self.build_names_index: 276 for target in self.build_names_index:
264 if target in dataCache.ignored_dependencies: 277 if re_match_strings(target, dataCache.ignored_dependencies):
265 continue 278 continue
266 if self.build_names_index.index(target) in self.failed_deps: 279 if self.build_names_index.index(target) in self.failed_deps:
267 continue 280 continue
@@ -276,7 +289,7 @@ class TaskData:
276 """ 289 """
277 unresolved = [] 290 unresolved = []
278 for target in self.run_names_index: 291 for target in self.run_names_index:
279 if target in dataCache.ignored_dependencies: 292 if re_match_strings(target, dataCache.ignored_dependencies):
280 continue 293 continue
281 if self.run_names_index.index(target) in self.failed_rdeps: 294 if self.run_names_index.index(target) in self.failed_rdeps:
282 continue 295 continue
@@ -356,7 +369,7 @@ class TaskData:
356 added internally during dependency resolution 369 added internally during dependency resolution
357 """ 370 """
358 371
359 if item in dataCache.ignored_dependencies: 372 if re_match_strings(item, dataCache.ignored_dependencies):
360 return 373 return
361 374
362 if not item in dataCache.providers: 375 if not item in dataCache.providers:
@@ -364,7 +377,7 @@ class TaskData:
364 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))) 377 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)))
365 else: 378 else:
366 bb.msg.note(2, bb.msg.domain.Provider, "Nothing PROVIDES '%s'" % (item)) 379 bb.msg.note(2, bb.msg.domain.Provider, "Nothing PROVIDES '%s'" % (item))
367 bb.event.fire(bb.event.NoProvider(item, cfgData)) 380 bb.event.fire(bb.event.NoProvider(item), cfgData)
368 raise bb.providers.NoProvider(item) 381 raise bb.providers.NoProvider(item)
369 382
370 if self.have_build_target(item): 383 if self.have_build_target(item):
@@ -377,7 +390,7 @@ class TaskData:
377 390
378 if not eligible: 391 if not eligible:
379 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))) 392 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)))
380 bb.event.fire(bb.event.NoProvider(item, cfgData)) 393 bb.event.fire(bb.event.NoProvider(item), cfgData)
381 raise bb.providers.NoProvider(item) 394 raise bb.providers.NoProvider(item)
382 395
383 if len(eligible) > 1 and foundUnique == False: 396 if len(eligible) > 1 and foundUnique == False:
@@ -387,7 +400,7 @@ class TaskData:
387 providers_list.append(dataCache.pkg_fn[fn]) 400 providers_list.append(dataCache.pkg_fn[fn])
388 bb.msg.note(1, bb.msg.domain.Provider, "multiple providers are available for %s (%s);" % (item, ", ".join(providers_list))) 401 bb.msg.note(1, bb.msg.domain.Provider, "multiple providers are available for %s (%s);" % (item, ", ".join(providers_list)))
389 bb.msg.note(1, bb.msg.domain.Provider, "consider defining PREFERRED_PROVIDER_%s" % item) 402 bb.msg.note(1, bb.msg.domain.Provider, "consider defining PREFERRED_PROVIDER_%s" % item)
390 bb.event.fire(bb.event.MultipleProviders(item, providers_list, cfgData)) 403 bb.event.fire(bb.event.MultipleProviders(item, providers_list), cfgData)
391 self.consider_msgs_cache.append(item) 404 self.consider_msgs_cache.append(item)
392 405
393 for fn in eligible: 406 for fn in eligible:
@@ -407,7 +420,7 @@ class TaskData:
407 (takes item names from RDEPENDS/PACKAGES namespace) 420 (takes item names from RDEPENDS/PACKAGES namespace)
408 """ 421 """
409 422
410 if item in dataCache.ignored_dependencies: 423 if re_match_strings(item, dataCache.ignored_dependencies):
411 return 424 return
412 425
413 if self.have_runtime_target(item): 426 if self.have_runtime_target(item):
@@ -417,7 +430,7 @@ class TaskData:
417 430
418 if not all_p: 431 if not all_p:
419 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)) 432 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))
420 bb.event.fire(bb.event.NoProvider(item, cfgData, runtime=True)) 433 bb.event.fire(bb.event.NoProvider(item, runtime=True), cfgData)
421 raise bb.providers.NoRProvider(item) 434 raise bb.providers.NoRProvider(item)
422 435
423 eligible, numberPreferred = bb.providers.filterProvidersRunTime(all_p, item, cfgData, dataCache) 436 eligible, numberPreferred = bb.providers.filterProvidersRunTime(all_p, item, cfgData, dataCache)
@@ -425,7 +438,7 @@ class TaskData:
425 438
426 if not eligible: 439 if not eligible:
427 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)) 440 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))
428 bb.event.fire(bb.event.NoProvider(item, cfgData, runtime=True)) 441 bb.event.fire(bb.event.NoProvider(item, runtime=True), cfgData)
429 raise bb.providers.NoRProvider(item) 442 raise bb.providers.NoRProvider(item)
430 443
431 if len(eligible) > 1 and numberPreferred == 0: 444 if len(eligible) > 1 and numberPreferred == 0:
@@ -435,7 +448,7 @@ class TaskData:
435 providers_list.append(dataCache.pkg_fn[fn]) 448 providers_list.append(dataCache.pkg_fn[fn])
436 bb.msg.note(2, bb.msg.domain.Provider, "multiple providers are available for runtime %s (%s);" % (item, ", ".join(providers_list))) 449 bb.msg.note(2, bb.msg.domain.Provider, "multiple providers are available for runtime %s (%s);" % (item, ", ".join(providers_list)))
437 bb.msg.note(2, bb.msg.domain.Provider, "consider defining a PREFERRED_PROVIDER entry to match runtime %s" % item) 450 bb.msg.note(2, bb.msg.domain.Provider, "consider defining a PREFERRED_PROVIDER entry to match runtime %s" % item)
438 bb.event.fire(bb.event.MultipleProviders(item,providers_list, cfgData, runtime=True)) 451 bb.event.fire(bb.event.MultipleProviders(item,providers_list, runtime=True), cfgData)
439 self.consider_msgs_cache.append(item) 452 self.consider_msgs_cache.append(item)
440 453
441 if numberPreferred > 1: 454 if numberPreferred > 1:
@@ -445,7 +458,7 @@ class TaskData:
445 providers_list.append(dataCache.pkg_fn[fn]) 458 providers_list.append(dataCache.pkg_fn[fn])
446 bb.msg.note(2, bb.msg.domain.Provider, "multiple providers are available for runtime %s (top %s entries preferred) (%s);" % (item, numberPreferred, ", ".join(providers_list))) 459 bb.msg.note(2, bb.msg.domain.Provider, "multiple providers are available for runtime %s (top %s entries preferred) (%s);" % (item, numberPreferred, ", ".join(providers_list)))
447 bb.msg.note(2, bb.msg.domain.Provider, "consider defining only one PREFERRED_PROVIDER entry to match runtime %s" % item) 460 bb.msg.note(2, bb.msg.domain.Provider, "consider defining only one PREFERRED_PROVIDER entry to match runtime %s" % item)
448 bb.event.fire(bb.event.MultipleProviders(item,providers_list, cfgData, runtime=True)) 461 bb.event.fire(bb.event.MultipleProviders(item,providers_list, runtime=True), cfgData)
449 self.consider_msgs_cache.append(item) 462 self.consider_msgs_cache.append(item)
450 463
451 # run through the list until we find one that we can build 464 # run through the list until we find one that we can build