summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/taskdata.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-01-20 18:46:02 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-01-20 18:46:02 +0000
commit22c29d8651668195f72e2f6a8e059d625eb511c3 (patch)
treedd1dd43f0ec47a9964c8a766eb8b3ad75cf51a64 /bitbake/lib/bb/taskdata.py
parent1bfd6edef9db9c9175058ae801d1b601e4f15263 (diff)
downloadpoky-22c29d8651668195f72e2f6a8e059d625eb511c3.tar.gz
bitbake: Switch to bitbake-dev version (bitbake master upstream)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/taskdata.py')
-rw-r--r--bitbake/lib/bb/taskdata.py38
1 files changed, 25 insertions, 13 deletions
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index 976e0ca1f9..4a88e75f6d 100644
--- a/bitbake/lib/bb/taskdata.py
+++ b/bitbake/lib/bb/taskdata.py
@@ -23,8 +23,20 @@ Task data collection and handling
23# with this program; if not, write to the Free Software Foundation, Inc., 23# with this program; if not, write to the Free Software Foundation, Inc.,
24# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 24# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 25
26from bb import data, event, mkdirhier, utils 26import bb
27import bb, os 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
28 40
29class TaskData: 41class TaskData:
30 """ 42 """
@@ -264,7 +276,7 @@ class TaskData:
264 """ 276 """
265 unresolved = [] 277 unresolved = []
266 for target in self.build_names_index: 278 for target in self.build_names_index:
267 if target in dataCache.ignored_dependencies: 279 if re_match_strings(target, dataCache.ignored_dependencies):
268 continue 280 continue
269 if self.build_names_index.index(target) in self.failed_deps: 281 if self.build_names_index.index(target) in self.failed_deps:
270 continue 282 continue
@@ -279,7 +291,7 @@ class TaskData:
279 """ 291 """
280 unresolved = [] 292 unresolved = []
281 for target in self.run_names_index: 293 for target in self.run_names_index:
282 if target in dataCache.ignored_dependencies: 294 if re_match_strings(target, dataCache.ignored_dependencies):
283 continue 295 continue
284 if self.run_names_index.index(target) in self.failed_rdeps: 296 if self.run_names_index.index(target) in self.failed_rdeps:
285 continue 297 continue
@@ -359,7 +371,7 @@ class TaskData:
359 added internally during dependency resolution 371 added internally during dependency resolution
360 """ 372 """
361 373
362 if item in dataCache.ignored_dependencies: 374 if re_match_strings(item, dataCache.ignored_dependencies):
363 return 375 return
364 376
365 if not item in dataCache.providers: 377 if not item in dataCache.providers:
@@ -367,7 +379,7 @@ class TaskData:
367 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))) 379 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)))
368 else: 380 else:
369 bb.msg.note(2, bb.msg.domain.Provider, "Nothing PROVIDES '%s'" % (item)) 381 bb.msg.note(2, bb.msg.domain.Provider, "Nothing PROVIDES '%s'" % (item))
370 bb.event.fire(bb.event.NoProvider(item, cfgData)) 382 bb.event.fire(bb.event.NoProvider(item), cfgData)
371 raise bb.providers.NoProvider(item) 383 raise bb.providers.NoProvider(item)
372 384
373 if self.have_build_target(item): 385 if self.have_build_target(item):
@@ -380,7 +392,7 @@ class TaskData:
380 392
381 if not eligible: 393 if not eligible:
382 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))) 394 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)))
383 bb.event.fire(bb.event.NoProvider(item, cfgData)) 395 bb.event.fire(bb.event.NoProvider(item), cfgData)
384 raise bb.providers.NoProvider(item) 396 raise bb.providers.NoProvider(item)
385 397
386 if len(eligible) > 1 and foundUnique == False: 398 if len(eligible) > 1 and foundUnique == False:
@@ -390,7 +402,7 @@ class TaskData:
390 providers_list.append(dataCache.pkg_fn[fn]) 402 providers_list.append(dataCache.pkg_fn[fn])
391 bb.msg.note(1, bb.msg.domain.Provider, "multiple providers are available for %s (%s);" % (item, ", ".join(providers_list))) 403 bb.msg.note(1, bb.msg.domain.Provider, "multiple providers are available for %s (%s);" % (item, ", ".join(providers_list)))
392 bb.msg.note(1, bb.msg.domain.Provider, "consider defining PREFERRED_PROVIDER_%s" % item) 404 bb.msg.note(1, bb.msg.domain.Provider, "consider defining PREFERRED_PROVIDER_%s" % item)
393 bb.event.fire(bb.event.MultipleProviders(item, providers_list, cfgData)) 405 bb.event.fire(bb.event.MultipleProviders(item, providers_list), cfgData)
394 self.consider_msgs_cache.append(item) 406 self.consider_msgs_cache.append(item)
395 407
396 for fn in eligible: 408 for fn in eligible:
@@ -410,7 +422,7 @@ class TaskData:
410 (takes item names from RDEPENDS/PACKAGES namespace) 422 (takes item names from RDEPENDS/PACKAGES namespace)
411 """ 423 """
412 424
413 if item in dataCache.ignored_dependencies: 425 if re_match_strings(item, dataCache.ignored_dependencies):
414 return 426 return
415 427
416 if self.have_runtime_target(item): 428 if self.have_runtime_target(item):
@@ -420,7 +432,7 @@ class TaskData:
420 432
421 if not all_p: 433 if not all_p:
422 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)) 434 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))
423 bb.event.fire(bb.event.NoProvider(item, cfgData, runtime=True)) 435 bb.event.fire(bb.event.NoProvider(item, runtime=True), cfgData)
424 raise bb.providers.NoRProvider(item) 436 raise bb.providers.NoRProvider(item)
425 437
426 eligible, numberPreferred = bb.providers.filterProvidersRunTime(all_p, item, cfgData, dataCache) 438 eligible, numberPreferred = bb.providers.filterProvidersRunTime(all_p, item, cfgData, dataCache)
@@ -428,7 +440,7 @@ class TaskData:
428 440
429 if not eligible: 441 if not eligible:
430 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)) 442 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))
431 bb.event.fire(bb.event.NoProvider(item, cfgData, runtime=True)) 443 bb.event.fire(bb.event.NoProvider(item, runtime=True), cfgData)
432 raise bb.providers.NoRProvider(item) 444 raise bb.providers.NoRProvider(item)
433 445
434 if len(eligible) > 1 and numberPreferred == 0: 446 if len(eligible) > 1 and numberPreferred == 0:
@@ -438,7 +450,7 @@ class TaskData:
438 providers_list.append(dataCache.pkg_fn[fn]) 450 providers_list.append(dataCache.pkg_fn[fn])
439 bb.msg.note(2, bb.msg.domain.Provider, "multiple providers are available for runtime %s (%s);" % (item, ", ".join(providers_list))) 451 bb.msg.note(2, bb.msg.domain.Provider, "multiple providers are available for runtime %s (%s);" % (item, ", ".join(providers_list)))
440 bb.msg.note(2, bb.msg.domain.Provider, "consider defining a PREFERRED_PROVIDER entry to match runtime %s" % item) 452 bb.msg.note(2, bb.msg.domain.Provider, "consider defining a PREFERRED_PROVIDER entry to match runtime %s" % item)
441 bb.event.fire(bb.event.MultipleProviders(item,providers_list, cfgData, runtime=True)) 453 bb.event.fire(bb.event.MultipleProviders(item,providers_list, runtime=True), cfgData)
442 self.consider_msgs_cache.append(item) 454 self.consider_msgs_cache.append(item)
443 455
444 if numberPreferred > 1: 456 if numberPreferred > 1:
@@ -448,7 +460,7 @@ class TaskData:
448 providers_list.append(dataCache.pkg_fn[fn]) 460 providers_list.append(dataCache.pkg_fn[fn])
449 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))) 461 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)))
450 bb.msg.note(2, bb.msg.domain.Provider, "consider defining only one PREFERRED_PROVIDER entry to match runtime %s" % item) 462 bb.msg.note(2, bb.msg.domain.Provider, "consider defining only one PREFERRED_PROVIDER entry to match runtime %s" % item)
451 bb.event.fire(bb.event.MultipleProviders(item,providers_list, cfgData, runtime=True)) 463 bb.event.fire(bb.event.MultipleProviders(item,providers_list, runtime=True), cfgData)
452 self.consider_msgs_cache.append(item) 464 self.consider_msgs_cache.append(item)
453 465
454 # run through the list until we find one that we can build 466 # run through the list until we find one that we can build