mirror of
https://git.yoctoproject.org/poky
synced 2026-02-05 16:28:43 +01:00
bitbake: build: Handle conflict between cwd and cleandirs
If the cwd of the task is also a cleandirs, you would see warnings from bitbake about being unable to obtain cwd during the task execution. Tweak the code to detect this and avoid the warnings. (Bitbake rev: 6c7fd60c10955b0f23f64b25b5b4e154eb22a8f8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -197,6 +197,8 @@ def exec_func(func, d, dirs = None):
|
||||
for cdir in d.expand(cleandirs).split():
|
||||
bb.utils.remove(cdir, True)
|
||||
bb.utils.mkdirhier(cdir)
|
||||
if cdir == oldcwd:
|
||||
os.chdir(cdir)
|
||||
|
||||
if flags and dirs is None:
|
||||
dirs = flags.get('dirs')
|
||||
|
||||
Reference in New Issue
Block a user