utility-tasks.bbclass: Use python functions for do_clean instead of os.system, remove pointless [dirs] flag

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Richard Purdie 2010-08-05 12:21:33 +01:00
parent 19be6b407c
commit e4c1c8c92e
1 changed files with 4 additions and 6 deletions

View File

@ -11,18 +11,16 @@ python do_listtasks() {
}
addtask clean
do_clean[dirs] = "${TOPDIR}"
do_clean[nostamp] = "1"
python do_clean() {
"""clear the build and temp directories"""
dir = bb.data.expand("${WORKDIR}", d)
if dir == '//': raise bb.build.FuncFailed("wrong DATADIR")
bb.note("removing " + dir)
os.system('rm -rf ' + dir)
bb.note("Removing " + dir)
oe.path.remove(dir)
dir = "%s.*" % bb.data.expand(bb.data.getVar('STAMP', d), d)
bb.note("removing " + dir)
os.system('rm -f '+ dir)
bb.note("Removing " + dir)
oe.path.remove(dir)
}
addtask rebuild after do_${BB_DEFAULT_TASK}