summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-01 11:58:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-01 12:05:37 +0000
commitef0888f83fa4408eb768257d7e03700202faad18 (patch)
treeb52f70684a8ad55d3e8ac21651b57577d7b97362
parent9f7978ca4d59b92721de508113dbac30721014d9 (diff)
downloadbitbake-ef0888f83fa4408eb768257d7e03700202faad18.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/build.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 6982a0acf..a9ce14fe7 100644
--- a/lib/bb/build.py
+++ b/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')