Patchwork [bitbake-devel,1/2] bitbake/lib/bb/build.py: fix the task flags cleandirs

login
register
mail settings
Submitter Robert Yang
Date Jan. 6, 2014, 9:52 a.m.
Message ID <101ef843af724489d409a5be10600c57a82d0dad.1389001793.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/64133/
State New
Headers show

Comments

Robert Yang - Jan. 6, 2014, 9:52 a.m.
The user manual said:

'cleandirs' - directories which should created before the task runs but should be empty

But it only removes the dir, doesn't create it

[YOCTO #5703]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 bitbake/lib/bb/build.py |    1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 1524da0..3aa6375 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -154,6 +154,7 @@  def exec_func(func, d, dirs = None):
     if cleandirs:
         for cdir in d.expand(cleandirs).split():
             bb.utils.remove(cdir, True)
+            bb.utils.mkdirhier(cdir)
 
     if dirs is None:
         dirs = flags.get('dirs')