[OE-core] [PATCH 2/2] populate_sdk_base: avoid executing empty function

Paul Eggleton paul.eggleton at linux.intel.com
Fri Apr 24 08:46:54 UTC 2015


On Friday 24 April 2015 16:14:36 ChenQi wrote:
> 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 at 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)
>
> 
> Thanks a lot.
> I'll send out V2.

Could you also please add [YOCTO #7598] to the commit message since that 
covers this issue:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=7598

Thanks,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the Openembedded-core mailing list