From: Patrick Ohly <patrick.ohly@intel.com>
To: Juro Bystricky <juro.bystricky@intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH v2] command.py: multiconfig support for findBestProvider
Date: Mon, 10 Apr 2017 08:01:07 +0200 [thread overview]
Message-ID: <1491804067.10884.88.camel@intel.com> (raw)
In-Reply-To: <1491672821-14233-1-git-send-email-juro.bystricky@intel.com>
On Sat, 2017-04-08 at 10:33 -0700, Juro Bystricky wrote:
> 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@intel.com>
> ---
> bitbake/lib/bb/command.py | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
> index 78a86ac..340842b 100644
> --- a/bitbake/lib/bb/command.py
> +++ b/bitbake/lib/bb/command.py
> @@ -141,6 +141,13 @@ class Command:
> self.currentAsyncCommand = None
> self.cooker.finishcommand()
>
> +def split_mc_pn(pn):
> + if pn.startswith("multiconfig:"):
> + mc = pn.split(":")[1]
> + pn = ":".join(pn.split(":")[2:])
I find this more readable:
if pn.startswith("multiconfig:"):
_, mc, pn = pn.split(":", 2)
Not sure whether it is worth a v3, though.
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
next prev parent reply other threads:[~2017-04-10 6:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-08 17:33 [PATCH v2] command.py: multiconfig support for findBestProvider Juro Bystricky
2017-04-10 6:01 ` Patrick Ohly [this message]
2017-04-10 15:41 ` Bystricky, Juro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1491804067.10884.88.camel@intel.com \
--to=patrick.ohly@intel.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=juro.bystricky@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.