]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
build: filter out expanded empty strings for lockfiles flag
authorStefan Stanacar <stefanx.stanacar@intel.com>
Thu, 27 Feb 2014 15:42:07 +0000 (17:42 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 28 Feb 2014 14:46:16 +0000 (14:46 +0000)
If we have something similar to:

    LOCKFILES = "${TMPDIR}/my.lock"
    LOCKFILES_qemuall = ""

    do_task[lockfiles] += "${LOCKFILES}"

when expanded, lockfiles will be empty for qemu, resulting in

     File "/home/stefans/yocto/poky/bitbake/lib/bb/utils.py", line 630, in mkdirhier
raise e
    OSError: [Errno 2] No such file or directory: ''

This should filter out the empty expansions.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/build.py

index 50a28dce7bd5d45602bc1e322ead146e0d391686..52e41493c1abf5a543338085581b406acce49dcd 100644 (file)
@@ -173,7 +173,7 @@ def exec_func(func, d, dirs = None):
 
     lockflag = flags.get('lockfiles')
     if lockflag:
-        lockfiles = [d.expand(f) for f in lockflag.split()]
+        lockfiles = [f for f in d.expand(lockflag).split()]
     else:
         lockfiles = None