diff options
author | Wenzong Fan <wenzong.fan@windriver.com> | 2012-07-11 11:28:11 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-11 15:55:25 +0100 |
commit | 6a210e88b73be40c433b350929a1128a39f2080b (patch) | |
tree | 96fa46bed9649aae52f1f5a4714b4306f42bd283 /bitbake | |
parent | 311550149a107243040040fcc32610f6617793c1 (diff) | |
download | poky-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>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/providers.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/taskdata.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py index bd729df93d..24cb217edf 100644 --- a/bitbake/lib/bb/providers.py +++ b/bitbake/lib/bb/providers.py | |||
@@ -35,6 +35,8 @@ class NoProvider(bb.BBHandledException): | |||
35 | class NoRProvider(bb.BBHandledException): | 35 | class 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 | ||
38 | class MultipleRProvider(bb.BBHandledException): | ||
39 | """Exception raised when multiple providers of a runtime dependency can be found""" | ||
38 | 40 | ||
39 | def findProviders(cfgData, dataCache, pkg_pn = None): | 41 | def findProviders(cfgData, dataCache, pkg_pn = None): |
40 | """ | 42 | """ |
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py index 55cdde553b..aed3a1638d 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: |