Skip to contentSkip to conversation

Two fixes related to uninative-tarball

PATCH In review Chen Qi 3 participants 6 messages Apr 24, 2015

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

v2 cover Two fixes related to uninative-tarball

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      | 4 +++-
 meta/recipes-core/meta/uninative-tarball.bb | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH v2 1/2 uninative-tarball: delete the packagedata task

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

---
 meta/recipes-core/meta/uninative-tarball.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/meta/uninative-tarball.bb +1 -0
index 62bdde8..41f7927 100644
@@ -23,6 +23,7 @@ inherit populate_sdk
 
 deltask install
 deltask package
+deltask packagedata
 
 SDK_DEPENDS += "patchelf-native"
 
Signature · 1 line
1.9.1
author
#4 lore raw

PATCH v2 2/2 populate_sdk_base: avoid executing empty function

In reply to Chen Qi

`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.

[YOCTO #7598]

---
 meta/classes/populate_sdk_base.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/classes/populate_sdk_base.bbclass +3 -1
index 5c07693..7f7a87f 100644
@@ -94,7 +94,9 @@ 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) or ""
+    if sdk_packaging_func.strip():
+        bb.build.exec_func(d.getVar("SDK_PACKAGING_FUNC", True), d)
 }
 
 fakeroot create_sdk_files() {
Signature · 1 line
1.9.1
#2 lore raw

Re: [PATCH V2 1/2] uninative-tarball: delete the packagedata task

In reply to Chen Qi
Quoted 31 lines · On Friday 24 April 2015 16:59:34 Chen Qi wrote:

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

---
 meta/recipes-core/meta/uninative-tarball.bb | 1 +
 1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/meta/recipes-core/meta/uninative-tarball.bb index 62bdde8..41f7927 100644

meta/recipes-core/meta/uninative-tarball.bb inherit populate_sdk · line 28

Quoted 6 lines
meta/recipes-core/meta/uninative-tarball.bb +1 -0
@@ -23,6 +23,7 @@ inherit populate_sdk
 
 deltask install
 deltask package
+deltask packagedata
 
 SDK_DEPENDS += "patchelf-native"

I forgot to note, this one is filed also - [YOCTO #7597]. Can you please add this to the commit message on the branch?

Thanks,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
author
#3 lore raw

Re: [PATCH V2 1/2] uninative-tarball: delete the packagedata task

Quoted 37 lines · Paul Eggleton
Quoted 36 lines · On Friday 24 April 2015 16:59:34 Chen Qi wrote:

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

---
  meta/recipes-core/meta/uninative-tarball.bb | 1 +
  1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/meta/recipes-core/meta/uninative-tarball.bb index 62bdde8..41f7927 100644

meta/recipes-core/meta/uninative-tarball.bb +1 -0
@@ -23,6 +23,7 @@ inherit populate_sdk
 
  deltask install
  deltask package
+deltask packagedata
 
Quoted 7 lines

meta/recipes-core/meta/uninative-tarball.bb inherit populate_sdk · line 28

Quoted 1 line
meta/recipes-core/meta/uninative-tarball.bb +0 -0
  SDK_DEPENDS += "patchelf-native"

I forgot to note, this one is filed also - [YOCTO #7597]. Can you please add this to the commit message on the branch?

Thanks,
Paul

Thanks for pointing that out.

I've updated the remote branch.

The bug number has been added to the commit message. See below.
http://cgit.openembedded.org/openembedded-core-contrib/commit/?h=ChenQi/uninative-tarball-fixes&id=db6c1f96c80a967b314cd1d1a671044c249e7777

Best Regards,
Chen Qi

#5 lore raw

Re: [PATCH V2 2/2] populate_sdk_base: avoid executing empty function

In reply to Chen Qi

meta/classes/populate_sdk_base.bbclass fakeroot python do_populate_sdk() { · line 100

Quoted 6 lines · Chen Qi
meta/classes/populate_sdk_base.bbclass +3 -1
-    bb.build.exec_func(d.getVar("SDK_PACKAGING_FUNC", True), d)
+    sdk_packaging_func = d.getVar("SDK_PACKAGING_FUNC", True) or ""
+    if sdk_packaging_func.strip():
+        bb.build.exec_func(d.getVar("SDK_PACKAGING_FUNC", True), d)
 }

You just put the value in a variable, why are you doing a second getvar instead of using it?

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics