From d47f4553893d0468827cc675a5b4334c9a0fdd29 Mon Sep 17 00:00:00 2001 From: Charlie Davies Date: Thu, 18 Feb 2021 20:52:13 +0000 Subject: bitbake: bitbake: providers: fix incorrect return type bug If no eligible providers are found then an integer zero is returned. This causes the following error, in two possible places in taskdata.py, when the return value is used in a list comprehension: [snip] eligible = [p for p in eligible if not p in self.failed_fns] TypeError: 'int' object is not iterable [\snip] Fix by returning the variable eligible itself, of type list. (Bitbake rev: 217c4b436b588a6a47aeaddf61531711ad3fca67) Signed-off-by: Charlie Davies Signed-off-by: Richard Purdie --- bitbake/lib/bb/providers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib/bb/providers.py') diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py index 0c87dfd4bc..32b2261eb0 100644 --- a/bitbake/lib/bb/providers.py +++ b/bitbake/lib/bb/providers.py @@ -250,7 +250,7 @@ def _filterProviders(providers, item, cfgData, dataCache): if len(eligible) == 0: logger.error("no eligible providers for %s", item) - return 0 + return eligible # If pn == item, give it a slight default preference # This means PREFERRED_PROVIDER_foobar defaults to foobar if available -- cgit v1.2.3-54-g00ecf