Skip to contentSkip to conversation

A couple of misc fixes

PATCH New Paul Eggleton 1 participant 3 messages Nov 8, 2017

lore
Share & tools
lore
#0 lore raw

cover A couple of misc fixes

A fix for a tinfoil issue as well as a typo.

The following changes since commit e1e8565b5e19dd3f7ef6e7e41932456adaa3df81:

tests/fetch: Add ftp test url (2017-11-07 14:41:54 +0000)

are available in the git repository at:

git://git.openembedded.org/bitbake-contrib paule/bb-fixes2
http://cgit.openembedded.org/bitbake-contrib/log/?h=paule/bb-fixes2

Paul Eggleton (2):
tinfoil: ensure get_recipe_info() returns Null if recipe not found
cooker: fix typo in bitbake -g message

 lib/bb/cooker.py  |  2 +-
 lib/bb/tinfoil.py | 17 ++++++++++-------
 2 files changed, 11 insertions(+), 8 deletions(-)
Signature · 1 line
2.9.5
#1 lore raw

PATCH 1/2 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.

---
 lib/bb/tinfoil.py | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
lib/bb/tinfoil.py +10 -7
index fb2ee4a..8bac394 100644
@@ -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):
         """
Signature · 1 line
2.9.5
#2 lore raw

PATCH 2/2 cooker: fix typo in bitbake -g message

In reply to Paul Eggleton

Flatened -> flattened.

---
 lib/bb/cooker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/cooker.py +1 -1
index c7fdd72..28717f4 100644
@@ -885,7 +885,7 @@ class BBCooker:
                         continue
                     f.write('"%s" -> "%s"\n' % (pn, dep))
             f.write("}\n")
-        logger.info("Flatened recipe dependencies saved to 'recipe-depends.dot'")
+        logger.info("Flattened recipe dependencies saved to 'recipe-depends.dot'")
 
     def show_appends_with_no_recipes(self):
         # Determine which bbappends haven't been applied
Signature · 1 line
2.9.5