1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-07 16:59:22 +00:00

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 <charles.davies@whitetree.xyz>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Charlie Davies
2021-02-18 20:52:13 +00:00
committed by Richard Purdie
parent a927a0d0b7
commit d47f455389
+1 -1
View File
@@ -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