[oe-commits] Chen Qi : populate_sdk_base: avoid executing empty function

git at git.openembedded.org git at git.openembedded.org
Fri Apr 24 10:15:04 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: 4c0ae7cce06de15f6881654ecec7f8bb743ff389
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=4c0ae7cce06de15f6881654ecec7f8bb743ff389

Author: Chen Qi <Qi.Chen at windriver.com>
Date:   Fri Apr 24 14:26:54 2015 +0800

populate_sdk_base: avoid executing empty function

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

Signed-off-by: Chen Qi <Qi.Chen at windriver.com>

---

 meta/classes/populate_sdk_base.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 13a0b1f..54b9af5 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -96,7 +96,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() {



More information about the Openembedded-commits mailing list