[bitbake-devel] [PATCH 1/2] tinfoil: fix get_recipe_file() to return an error on invalid recipe

Paul Eggleton paul.eggleton at linux.intel.com
Thu Mar 30 02:23:59 UTC 2017


This function calls cooker.findBestProvider() but didn't handle the fact
that that function returns a tuple (None, None, None, None) when there
is no matching recipe. (This fixes devtool in OpenEmbedded showing a
traceback when an invalid recipe is specified instead of a proper error
message.)

Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
---
 lib/bb/tinfoil.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/tinfoil.py b/lib/bb/tinfoil.py
index c2ee707..14a2271 100644
--- a/lib/bb/tinfoil.py
+++ b/lib/bb/tinfoil.py
@@ -363,7 +363,7 @@ class Tinfoil:
         skipped.
         """
         best = self.find_best_provider(pn)
-        if not best:
+        if not best or (len(best) > 3 and not best[3]):
             skiplist = self.get_skipped_recipes()
             taskdata = bb.taskdata.TaskData(None, skiplist=skiplist)
             skipreasons = taskdata.get_reasons(pn)
-- 
2.9.3




More information about the bitbake-devel mailing list