[oe-commits] [openembedded-core] 03/19: ccache.bbclass: Add task do_cleanccache

git at git.openembedded.org git at git.openembedded.org
Sat Jan 12 16:22:59 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit a5d8a052c00cfa24faac627d2c98c6917b9ebcdc
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Thu Dec 13 17:33:13 2018 +0800

    ccache.bbclass: Add task do_cleanccache
    
    Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
 meta/classes/ccache.bbclass | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index f3612c5..fb3fbdf 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -48,3 +48,17 @@ python() {
         d.appendVar('DEPENDS', ' ccache-native')
         d.setVar('CCACHE', 'ccache ')
 }
+
+addtask cleanccache after do_clean
+python do_cleanccache() {
+    import shutil
+
+    ccache_dir = d.getVar('CCACHE_DIR')
+    if os.path.exists(ccache_dir):
+        bb.note("Removing %s" % ccache_dir)
+        shutil.rmtree(ccache_dir)
+    else:
+        bb.note("%s doesn't exist" % ccache_dir)
+}
+addtask cleanall after do_cleanccache
+do_cleanccache[nostamp] = "1"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list