From: ChenQi <Qi.Chen@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 2/2] populate_sdk_base: avoid executing empty function
Date: Fri, 24 Apr 2015 16:14:36 +0800 [thread overview]
Message-ID: <5539FB6C.3010301@windriver.com> (raw)
In-Reply-To: <1429860029.26983.127.camel@linuxfoundation.org>
On 04/24/2015 03:20 PM, Richard Purdie wrote:
> On Fri, 2015-04-24 at 14:50 +0800, Chen Qi wrote:
>> `bitbake uninative-tarball' raises the following warning.
>>
>> WARNING: Function doesn't exist
>>
>> This is because SDK_PACKAGING_FUNC is set to "" in its recipe.
>> Anyway, we need to check this variable to avoid executing empty function.
>>
>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> ---
>> meta/classes/populate_sdk_base.bbclass | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
>> index 5c07693..6e3e84f 100644
>> --- a/meta/classes/populate_sdk_base.bbclass
>> +++ b/meta/classes/populate_sdk_base.bbclass
>> @@ -94,7 +94,11 @@ fakeroot python do_populate_sdk() {
>>
>> bb.build.exec_func("tar_sdk", d)
>>
>> - bb.build.exec_func(d.getVar("SDK_PACKAGING_FUNC", True), d)
>> + sdk_packaging_func = d.getVar("SDK_PACKAGING_FUNC", True)
>> + if sdk_packaging_func:
>> + sdk_packaging_func = sdk_packaging_func.strip()
>> + if sdk_packaging_func != "":
>> + bb.build.exec_func(d.getVar("SDK_PACKAGING_FUNC", True), d)
> This is slightly overcomplicated. You can just do something like:
>
> sdk_packaging_func = d.getVar("SDK_PACKAGING_FUNC", True) or ""
> if sdk_packaging_func.strip():
> bb.build.exec_func(sdk_packaging_func, d)
>
> Cheers,
>
> Richard
>
>
>
Thanks a lot.
I'll send out V2.
Best Regards,
Chen Qi
next prev parent reply other threads:[~2015-04-24 8:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-24 6:50 [PATCH 0/2] Two fixes related to uninative-tarball Chen Qi
2015-04-24 6:50 ` [PATCH 1/2] uninative-tarball: delete the packagedata task Chen Qi
2015-04-24 6:50 ` [PATCH 2/2] populate_sdk_base: avoid executing empty function Chen Qi
2015-04-24 7:20 ` Richard Purdie
2015-04-24 8:14 ` ChenQi [this message]
2015-04-24 8:46 ` Paul Eggleton
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=5539FB6C.3010301@windriver.com \
--to=qi.chen@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox