summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-09-05 08:40:25 +0000
committerRichard Purdie <richard@openedhand.com>2007-09-05 08:40:25 +0000
commit9c9fad56548f0cb447a538dcfdf390eb39cdc6c5 (patch)
tree27e64058b9c282bd44c9f99efb9bd505d16321be /bitbake/lib
parent763dc8a90934e74feab6959917fa913dc6568956 (diff)
downloadpoky-9c9fad56548f0cb447a538dcfdf390eb39cdc6c5.tar.gz
build.py: Add support for cleaning directories before a task in the form: do_taskname[cleandirs] = 'dir'
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2693 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/build.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index e9a6fc8c61..501f4f8206 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -74,10 +74,13 @@ def exec_func(func, d, dirs = None):
74 if not body: 74 if not body:
75 return 75 return
76 76
77 cleandirs = (data.expand(data.getVarFlag(func, 'cleandirs', d), d) or "").split()
78 for cdir in cleandirs:
79 os.system("rm -rf %s" % cdir)
80
77 if not dirs: 81 if not dirs:
78 dirs = (data.getVarFlag(func, 'dirs', d) or "").split() 82 dirs = (data.expand(data.getVarFlag(func, 'dirs', d), d) or "").split()
79 for adir in dirs: 83 for adir in dirs:
80 adir = data.expand(adir, d)
81 mkdirhier(adir) 84 mkdirhier(adir)
82 85
83 if len(dirs) > 0: 86 if len(dirs) > 0: