]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: do_split_packages should always return something.
authorJosua Mayer <josua.mayer97@gmail.com>
Fri, 14 Feb 2014 15:02:24 +0000 (16:02 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 17 Feb 2014 15:27:55 +0000 (15:27 +0000)
So far, when do_split_packages is passed a non-existing folder, it will return nothing.
While building Mesa with PACKAGECONFIG="egl gles" for qemux86, do_package threw a nice exception on a line reading "pkgs += do_split_packages":
"Exception: TypeError: 'NoneType' object is not iterable"
I think a function should always return something, and in this specific case, returning an empty list should be right.
This patch simply fixes the return statement to do just that.

Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/package.bbclass

index 042d74c17b8daee8bcb8ebce1146d0a9c1bdeeda..297d962266e7019c93a8c8506a8cefc9f0ad80f5 100644 (file)
@@ -126,7 +126,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
     # If the root directory doesn't exist, don't error out later but silently do
     # no splitting.
     if not os.path.exists(dvar + root):
-        return
+        return []
 
     ml = d.getVar("MLPREFIX", True)
     if ml: