From 0e676f74c555a7a7deebd3d1e9e8c996bd6ab9a2 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 1 Dec 2011 11:58:41 +0000 Subject: build.py: Be determistic about a function's cwd There is a subtle but nasty problem that a function's cwd can vary depending on whether ${B} (often ${S}) exists before the funciton is called or not. Most functions in the system can cope with this but its bad practise and I've just witnessed build failures resulting from this during image generation from bootimg.bbclass. I also suspect this could explain some odd fetcher behaviour witnessed in the past. This change ensures we always call funcitons with a specific build directory making things deterministic. (Bitbake rev: ef0888f83fa4408eb768257d7e03700202faad18) Signed-off-by: Richard Purdie --- bitbake/lib/bb/build.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 8937f083a1..575ef4aaf1 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py @@ -149,8 +149,7 @@ def exec_func(func, d, dirs = None): adir = dirs[-1] else: adir = data.getVar('B', d, 1) - if not os.path.exists(adir): - adir = None + bb.utils.mkdirhier(adir) ispython = flags.get('python') if flags.get('fakeroot') and not flags.get('task'): -- cgit v1.2.3-54-g00ecf