Patchwork [bitbake-devel] build: filter out expanded empty strings for lockfiles flag

login
register
mail settings
Submitter Stanacar, StefanX
Date Feb. 27, 2014, 3:42 p.m.
Message ID <1393515727-421-1-git-send-email-stefanx.stanacar@intel.com>
Download mbox | patch
Permalink /patch/67593/
State New
Headers show

Comments

Stanacar, StefanX - Feb. 27, 2014, 3:42 p.m.
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>
---
 bitbake/lib/bb/build.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 50a28dc..52e4149 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -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