Skip to contentSkip to conversation

recipetool: newappend: drop _provide_to_pn

PATCH New Christopher Larson 1 participant 1 message Sep 27, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 recipetool: newappend: drop _provide_to_pn

From: Christopher Larson <[email protected]>

This function was broken by the multi-config changes, and isn't needed anymore now that recipeutils.pn_to_recipe can handle provides. Without this, the newappend sub-command fails.

---
 scripts/lib/recipetool/newappend.py | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
scripts/lib/recipetool/newappend.py +1 -12
index 4fbb40a..fbdd7bc 100644
@@ -39,16 +39,6 @@ def tinfoil_init(instance):
     tinfoil = instance
 
 
-def _provide_to_pn(cooker, provide):
-    """Get the name of the preferred recipe for the specified provide."""
-    import bb.providers
-    filenames = cooker.recipecache.providers[provide]
-    eligible, foundUnique = bb.providers.filterProviders(filenames, provide, cooker.expanded_data, cooker.recipecache)
-    filename = eligible[0]
-    pn = cooker.recipecache.pkg_fn[filename]
-    return pn
-
-
 def _get_recipe_file(cooker, pn):
     import oe.recipeutils
     recipefile = oe.recipeutils.pn_to_recipe(cooker, pn)
@@ -70,8 +60,7 @@ def layer(layerpath):
 def newappend(args):
     import oe.recipeutils
 
-    pn = _provide_to_pn(tinfoil.cooker, args.target)
-    recipe_path = _get_recipe_file(tinfoil.cooker, pn)
+    recipe_path = _get_recipe_file(tinfoil.cooker, args.target)
 
     rd = tinfoil.config_data.createCopy()
     rd.setVar('FILE', recipe_path)
Signature · 1 line
2.8.0