summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWenzong Fan <wenzong.fan@windriver.com>2012-07-11 03:28:11 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-11 14:55:25 (GMT)
commit6a210e88b73be40c433b350929a1128a39f2080b (patch)
tree96fa46bed9649aae52f1f5a4714b4306f42bd283
parent311550149a107243040040fcc32610f6617793c1 (diff)
downloadpoky-6a210e88b73be40c433b350929a1128a39f2080b.tar.gz
bitbake: bitbake: Abort build if runtime dependency conflict
Currently if there are multiple preferred providers available for a runtime dependency, bitbake will print an Error message and let the build go on. Anyways the build should abort while any Errors occured. [YOCTO #2734] (Bitbake rev: 5f81a714f4fca785780bef555b419f0250e5ec1c) Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/providers.py2
-rw-r--r--bitbake/lib/bb/taskdata.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py
index bd729df..24cb217 100644
--- a/bitbake/lib/bb/providers.py
+++ b/bitbake/lib/bb/providers.py
@@ -35,6 +35,8 @@ class NoProvider(bb.BBHandledException):
35class NoRProvider(bb.BBHandledException): 35class NoRProvider(bb.BBHandledException):
36 """Exception raised when no provider of a runtime dependency can be found""" 36 """Exception raised when no provider of a runtime dependency can be found"""
37 37
38class MultipleRProvider(bb.BBHandledException):
39 """Exception raised when multiple providers of a runtime dependency can be found"""
38 40
39def findProviders(cfgData, dataCache, pkg_pn = None): 41def findProviders(cfgData, dataCache, pkg_pn = None):
40 """ 42 """
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index 55cdde5..aed3a16 100644
--- a/bitbake/lib/bb/taskdata.py
+++ b/bitbake/lib/bb/taskdata.py
@@ -482,6 +482,7 @@ class TaskData:
482 providers_list.append(dataCache.pkg_fn[fn]) 482 providers_list.append(dataCache.pkg_fn[fn])
483 bb.event.fire(bb.event.MultipleProviders(item, providers_list, runtime=True), cfgData) 483 bb.event.fire(bb.event.MultipleProviders(item, providers_list, runtime=True), cfgData)
484 self.consider_msgs_cache.append(item) 484 self.consider_msgs_cache.append(item)
485 raise bb.providers.MultipleRProvider(item)
485 486
486 # run through the list until we find one that we can build 487 # run through the list until we find one that we can build
487 for fn in eligible: 488 for fn in eligible:
@@ -580,7 +581,7 @@ class TaskData:
580 try: 581 try:
581 self.add_rprovider(cfgData, dataCache, target) 582 self.add_rprovider(cfgData, dataCache, target)
582 added = added + 1 583 added = added + 1
583 except bb.providers.NoRProvider: 584 except (bb.providers.NoRProvider, bb.providers.MultipleRProvider):
584 self.remove_runtarget(self.getrun_id(target)) 585 self.remove_runtarget(self.getrun_id(target))
585 logger.debug(1, "Resolved " + str(added) + " extra dependencies") 586 logger.debug(1, "Resolved " + str(added) + " extra dependencies")
586 if added == 0: 587 if added == 0: