From e4c1c8c92e4f47b69a9d7dcccb32ee3bb1ad7d18 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 5 Aug 2010 12:21:33 +0100 Subject: utility-tasks.bbclass: Use python functions for do_clean instead of os.system, remove pointless [dirs] flag Signed-off-by: Richard Purdie --- meta/classes/utility-tasks.bbclass | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'meta/classes/utility-tasks.bbclass') diff --git a/meta/classes/utility-tasks.bbclass b/meta/classes/utility-tasks.bbclass index 20b50ab8d1..32333baf14 100644 --- a/meta/classes/utility-tasks.bbclass +++ b/meta/classes/utility-tasks.bbclass @@ -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} -- cgit v1.2.3-54-g00ecf