diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-05 12:21:33 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-12 14:41:31 +0100 |
commit | e4c1c8c92e4f47b69a9d7dcccb32ee3bb1ad7d18 (patch) | |
tree | 6fb3ce1b0bb8b7600e4db0da9c51026d358d7a5e /meta/classes/utility-tasks.bbclass | |
parent | 19be6b407c6595f1d975d249bee3bf4271f0946f (diff) | |
download | poky-e4c1c8c92e4f47b69a9d7dcccb32ee3bb1ad7d18.tar.gz |
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>
Diffstat (limited to 'meta/classes/utility-tasks.bbclass')
-rw-r--r-- | meta/classes/utility-tasks.bbclass | 10 |
1 files changed, 4 insertions, 6 deletions
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() { | |||
11 | } | 11 | } |
12 | 12 | ||
13 | addtask clean | 13 | addtask clean |
14 | do_clean[dirs] = "${TOPDIR}" | ||
15 | do_clean[nostamp] = "1" | 14 | do_clean[nostamp] = "1" |
16 | python do_clean() { | 15 | python do_clean() { |
17 | """clear the build and temp directories""" | 16 | """clear the build and temp directories""" |
18 | dir = bb.data.expand("${WORKDIR}", d) | 17 | dir = bb.data.expand("${WORKDIR}", d) |
19 | if dir == '//': raise bb.build.FuncFailed("wrong DATADIR") | 18 | bb.note("Removing " + dir) |
20 | bb.note("removing " + dir) | 19 | oe.path.remove(dir) |
21 | os.system('rm -rf ' + dir) | ||
22 | 20 | ||
23 | dir = "%s.*" % bb.data.expand(bb.data.getVar('STAMP', d), d) | 21 | dir = "%s.*" % bb.data.expand(bb.data.getVar('STAMP', d), d) |
24 | bb.note("removing " + dir) | 22 | bb.note("Removing " + dir) |
25 | os.system('rm -f '+ dir) | 23 | oe.path.remove(dir) |
26 | } | 24 | } |
27 | 25 | ||
28 | addtask rebuild after do_${BB_DEFAULT_TASK} | 26 | addtask rebuild after do_${BB_DEFAULT_TASK} |