]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
build: fix empty function execution
authorChris Larson <chris_larson@mentor.com>
Wed, 29 Dec 2010 00:23:34 +0000 (17:23 -0700)
committerChris Larson <chris_larson@mentor.com>
Wed, 29 Dec 2010 00:23:58 +0000 (17:23 -0700)
- If the function is empty *or* unset, don't exec it.
- If the function is unset, warn.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/build.py

index 03b0b17137292ca8db1513d5d9b1aa5859818b20..4c4946de0b082838fae0379b714c91f2fcdf31b6 100644 (file)
@@ -129,8 +129,9 @@ def exec_func(func, d, dirs = None, logfile = NULL):
     """Execute an BB 'function'"""
 
     body = data.getVar(func, d)
-    if body is None:
-        logger.warn("Function %s doesn't exist", func)
+    if not body:
+        if body is None:
+            logger.warn("Function %s doesn't exist", func)
         return
 
     flags = data.getVarFlags(func, d)