summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2018-12-13 17:33:13 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-14 11:35:55 +0000
commit7953d6a8bc4beffea7994d6e57f6a5e000ca1889 (patch)
treeba1f4f5ccb2791e84b6f2024812d1f7dda2806e3
parente1cad77fa74c828cb08e620aaa4d804df829deeb (diff)
downloadpoky-7953d6a8bc4beffea7994d6e57f6a5e000ca1889.tar.gz
ccache.bbclass: Add task do_cleanccache
(From OE-Core rev: 36cead66fbadd8c3827aec4b67ea124ee3c2ff94) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/ccache.bbclass14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index f3612c5019..fb3fbdf25c 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -48,3 +48,17 @@ python() {
48 d.appendVar('DEPENDS', ' ccache-native') 48 d.appendVar('DEPENDS', ' ccache-native')
49 d.setVar('CCACHE', 'ccache ') 49 d.setVar('CCACHE', 'ccache ')
50} 50}
51
52addtask cleanccache after do_clean
53python do_cleanccache() {
54 import shutil
55
56 ccache_dir = d.getVar('CCACHE_DIR')
57 if os.path.exists(ccache_dir):
58 bb.note("Removing %s" % ccache_dir)
59 shutil.rmtree(ccache_dir)
60 else:
61 bb.note("%s doesn't exist" % ccache_dir)
62}
63addtask cleanall after do_cleanccache
64do_cleanccache[nostamp] = "1"