All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Two fixes related to uninative-tarball
@ 2015-04-24  6:50 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
  0 siblings, 2 replies; 6+ messages in thread
From: Chen Qi @ 2015-04-24  6:50 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit c9b06c79ed8a082d1b385e9f61721aeeda9bf1af:

  init-install-efi.sh: fix gummiboot entry installation (2015-04-21 07:19:07 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib ChenQi/uninative-tarball-fixes
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/uninative-tarball-fixes

Chen Qi (2):
  uninative-tarball: delete the packagedata task
  populate_sdk_base: avoid executing empty function

 meta/classes/populate_sdk_base.bbclass      | 6 +++++-
 meta/recipes-core/meta/uninative-tarball.bb | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] uninative-tarball: delete the packagedata task
  2015-04-24  6:50 [PATCH 0/2] Two fixes related to uninative-tarball Chen Qi
@ 2015-04-24  6:50 ` Chen Qi
  2015-04-24  6:50 ` [PATCH 2/2] populate_sdk_base: avoid executing empty function Chen Qi
  1 sibling, 0 replies; 6+ messages in thread
From: Chen Qi @ 2015-04-24  6:50 UTC (permalink / raw)
  To: openembedded-core

This task is meaningless for uninative-tarball as the package task
has been deleted. Besides, sometimes it would cause problems. To
reproduce, use the following command.

bitbake uninative-tarball -c cleansstate && bitbake uninative-tarball &&
bitbake uninative-tarball -c clean && bitbake uninative-tarball

The error is something like below.

File: 'sstate.bbclass', lineno: 33, function: sstate_installpkg
     0029:        bb.build.exec_func(f, d)
     0030:
     0031:    for state in ss['dirs']:
     0032:        prepdir(state[1])
 *** 0033:        os.rename(sstateinst + state[0], state[1])
     0034:    sstate_install(ss, d)
     0035:
     0036:    for plain in ss['plaindirs']:
     0037:        workdir = d.getVar('WORKDIR', True)
Exception: OSError: [Errno 2] No such file or directory

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/meta/uninative-tarball.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/meta/uninative-tarball.bb b/meta/recipes-core/meta/uninative-tarball.bb
index 62bdde8..41f7927 100644
--- a/meta/recipes-core/meta/uninative-tarball.bb
+++ b/meta/recipes-core/meta/uninative-tarball.bb
@@ -23,6 +23,7 @@ inherit populate_sdk
 
 deltask install
 deltask package
+deltask packagedata
 
 SDK_DEPENDS += "patchelf-native"
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] populate_sdk_base: avoid executing empty function
  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 ` Chen Qi
  2015-04-24  7:20   ` Richard Purdie
  1 sibling, 1 reply; 6+ messages in thread
From: Chen Qi @ 2015-04-24  6:50 UTC (permalink / raw)
  To: openembedded-core

`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)
 }
 
 fakeroot create_sdk_files() {
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] populate_sdk_base: avoid executing empty function
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2015-04-24  7:20 UTC (permalink / raw)
  To: Chen Qi; +Cc: openembedded-core

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] populate_sdk_base: avoid executing empty function
  2015-04-24  7:20   ` Richard Purdie
@ 2015-04-24  8:14     ` ChenQi
  2015-04-24  8:46       ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: ChenQi @ 2015-04-24  8:14 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] populate_sdk_base: avoid executing empty function
  2015-04-24  8:14     ` ChenQi
@ 2015-04-24  8:46       ` Paul Eggleton
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2015-04-24  8:46 UTC (permalink / raw)
  To: ChenQi, openembedded-core

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@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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-24  8:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2015-04-24  8:46       ` Paul Eggleton

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.