From: Paul Eggleton Date: Wed, 8 Nov 2017 02:20:27 +0000 (+1300) Subject: bitbake: tinfoil: ensure get_recipe_info() returns Null if recipe not found X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41c868d0763232cf23b80b51c48cee566112020e;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: tinfoil: ensure get_recipe_info() returns Null if recipe not found If a matching recipe is not found then return Null instead of raising KeyError because we were blindly using None as a key for pkg_fn. (Bitbake rev: 431e89e322850a2497157c3c0843da9df6bc9a3e) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index fa95f6329f8..368264f39ab 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py @@ -604,13 +604,16 @@ class Tinfoil: recipecache = self.cooker.recipecaches[mc] prov = self.find_best_provider(pn) fn = prov[3] - actual_pn = recipecache.pkg_fn[fn] - recipe = TinfoilRecipeInfo(recipecache, - self.config_data, - pn=actual_pn, - fn=fn, - fns=recipecache.pkg_pn[actual_pn]) - return recipe + if fn: + actual_pn = recipecache.pkg_fn[fn] + recipe = TinfoilRecipeInfo(recipecache, + self.config_data, + pn=actual_pn, + fn=fn, + fns=recipecache.pkg_pn[actual_pn]) + return recipe + else: + return None def parse_recipe(self, pn): """