]> code.ossystems Code Review - openembedded-core.git/commitdiff
utility-tasks.bbclass: Use python functions for do_clean instead of os.system, remove...
authorRichard Purdie <rpurdie@linux.intel.com>
Thu, 5 Aug 2010 11:21:33 +0000 (12:21 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Thu, 12 Aug 2010 13:41:31 +0000 (14:41 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
meta/classes/utility-tasks.bbclass

index 20b50ab8d1b7a5c1467c6c7e7e602119732c0afc..32333baf141ae248b8875c5a1f8985905a3a7a05 100644 (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}