diff options
author | Richard Purdie <richard@openedhand.com> | 2007-09-05 08:40:25 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-09-05 08:40:25 +0000 |
commit | 9c9fad56548f0cb447a538dcfdf390eb39cdc6c5 (patch) | |
tree | 27e64058b9c282bd44c9f99efb9bd505d16321be | |
parent | 763dc8a90934e74feab6959917fa913dc6568956 (diff) | |
download | openembedded-core-9c9fad56548f0cb447a538dcfdf390eb39cdc6c5.tar.gz openembedded-core-9c9fad56548f0cb447a538dcfdf390eb39cdc6c5.tar.bz2 openembedded-core-9c9fad56548f0cb447a538dcfdf390eb39cdc6c5.zip |
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
-rw-r--r-- | bitbake/ChangeLog | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/build.py | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/bitbake/ChangeLog b/bitbake/ChangeLog index 0c7e6d8a8e..4125e03169 100644 --- a/bitbake/ChangeLog +++ b/bitbake/ChangeLog @@ -10,6 +10,8 @@ Changes in BitBake 1.8.x: - Handle paths in svn fetcher module parameter - Support the syntax "export VARIABLE" - Add bzr fetcher + - Add support for cleaning directories before a task in the form: + do_taskname[cleandirs] = "dir" Changes in Bitbake 1.8.8: - Rewrite svn fetcher to make adding extra operations easier 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): if not body: return + cleandirs = (data.expand(data.getVarFlag(func, 'cleandirs', d), d) or "").split() + for cdir in cleandirs: + os.system("rm -rf %s" % cdir) + if not dirs: - dirs = (data.getVarFlag(func, 'dirs', d) or "").split() + dirs = (data.expand(data.getVarFlag(func, 'dirs', d), d) or "").split() for adir in dirs: - adir = data.expand(adir, d) mkdirhier(adir) if len(dirs) > 0: |