[oe-commits] [bitbake] branch master updated: command.py: multiconfig support for findBestProvider
git at git.openembedded.org
git at git.openembedded.org
Wed Apr 19 09:20:56 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository bitbake.
The following commit(s) were added to refs/heads/master by this push:
new e9c03fb command.py: multiconfig support for findBestProvider
e9c03fb is described below
commit e9c03fbfd7b057b28645affa263cb4aebfa24b04
Author: Juro Bystricky <juro.bystricky at intel.com>
AuthorDate: Mon Apr 10 08:51:04 2017 -0700
command.py: multiconfig support for findBestProvider
In a multiconfig environment, a tinfoil call such as
tinfoil.parse_recipe("multiconfig:arduino-101-sss:gcc")
can fail with an error such as:
File "/data/master/poky/bitbake/lib/bb/tinfoil.py", line 373, in get_recipe_file
raise bb.providers.NoProvider('Unable to find any recipe file matching "%s"' % pn)
bb.providers.NoProvider: Unable to find any recipe file matching "multiconfig:arduino-101-sss:gcc"
The culprit is findBestProvider, which does not handle multiconfig.
This patch fixes the error and in the case mentioned above the tinfoil call returns:
"multiconfig:arduino-101-sss:/data/master/poky/meta/recipes-devtools/gcc/gcc_6.3.bb"
[YOCTO#11210]
Signed-off-by: Juro Bystricky <juro.bystricky at intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/command.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/bb/command.py b/lib/bb/command.py
index 78a86ac..390d4f1 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -141,6 +141,12 @@ class Command:
self.currentAsyncCommand = None
self.cooker.finishcommand()
+def split_mc_pn(pn):
+ if pn.startswith("multiconfig:"):
+ _, mc, pn = pn.split(":", 2)
+ return (mc, pn)
+ return ('', pn)
+
class CommandsSync:
"""
A class of synchronous commands
@@ -425,8 +431,8 @@ class CommandsSync:
findProviders.readonly = True
def findBestProvider(self, command, params):
- pn = params[0]
- return command.cooker.findBestProvider(pn)
+ (mc, pn) = split_mc_pn(params[0])
+ return command.cooker.findBestProvider(pn, mc)
findBestProvider.readonly = True
def allProviders(self, command, params):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list