[oe-commits] [openembedded-core] 05/18: lib/oe/recipeutils: use cooker function instead of bb.providers

git at git.openembedded.org git at git.openembedded.org
Wed Dec 14 09:57:19 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 0a6a4be99c1e4ef3c0da53d63f18ad579545d6a8
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Tue Dec 13 20:09:33 2016 +1300

    lib/oe/recipeutils: use cooker function instead of bb.providers
    
    We now have a function in cooker itself that can do this lookup;
    additionally, the rewritten tinfoil's cooker adapter has its own
    implementation that can work remotely, so if we use it then this
    function can work in that scenario as well.
    
    Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/lib/oe/recipeutils.py | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 1589feb..ae83aab 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -29,18 +29,9 @@ meta_vars = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION']
 
 def pn_to_recipe(cooker, pn, mc=''):
     """Convert a recipe name (PN) to the path to the recipe file"""
-    import bb.providers
 
-    if pn in cooker.recipecaches[mc].pkg_pn:
-        best = bb.providers.findBestProvider(pn, cooker.data, cooker.recipecaches[mc], cooker.recipecaches[mc].pkg_pn)
-        return best[3]
-    elif pn in cooker.recipecaches[mc].providers:
-        filenames = cooker.recipecaches[mc].providers[pn]
-        eligible, foundUnique = bb.providers.filterProviders(filenames, pn, cooker.expanded_data, cooker.recipecaches[mc])
-        filename = eligible[0]
-        return filename
-    else:
-        return None
+    best = cooker.findBestProvider(pn, mc)
+    return best[3]
 
 
 def get_unavailable_reasons(cooker, pn):

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list