summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-01 11:58:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-30 16:16:13 +0000
commit0e676f74c555a7a7deebd3d1e9e8c996bd6ab9a2 (patch)
tree7ec6c88152fff070cd478de7003ea16e7c7adfd4 /bitbake
parent26666187e3e8b129485c442dc72c7e51c91c5e8d (diff)
downloadpoky-0e676f74c555a7a7deebd3d1e9e8c996bd6ab9a2.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. (Bitbake rev: ef0888f83fa4408eb768257d7e03700202faad18) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/build.py3
1 files changed, 1 insertions, 2 deletions
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):
149 adir = dirs[-1] 149 adir = dirs[-1]
150 else: 150 else:
151 adir = data.getVar('B', d, 1) 151 adir = data.getVar('B', d, 1)
152 if not os.path.exists(adir): 152 bb.utils.mkdirhier(adir)
153 adir = None
154 153
155 ispython = flags.get('python') 154 ispython = flags.get('python')
156 if flags.get('fakeroot') and not flags.get('task'): 155 if flags.get('fakeroot') and not flags.get('task'):