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

Submitted by Paul Eggleton on March 30, 2017, 2:23 a.m. | Patch ID: 138597

Details

Message ID a8c46a5ae21994498726bcea39b5ce512a5ae7a6.1490840595.git.paul.eggleton@linux.intel.com
State New
Headers show

Commit Message

Paul Eggleton March 30, 2017, 2:23 a.m.
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@linux.intel.com>
---
 lib/bb/tinfoil.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

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)