diff options
Diffstat (limited to 'bitbake/lib/bb/cache.py')
-rw-r--r-- | bitbake/lib/bb/cache.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index 958652e0e3..ec7b023fc7 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py | |||
@@ -847,6 +847,16 @@ class MultiProcessCache(object): | |||
847 | data = [{}] | 847 | data = [{}] |
848 | return data | 848 | return data |
849 | 849 | ||
850 | def clear_cache(self): | ||
851 | if not self.cachefile: | ||
852 | bb.fatal("Can't clear invalid cachefile") | ||
853 | |||
854 | self.cachedata = self.create_cachedata() | ||
855 | self.cachedata_extras = self.create_cachedata() | ||
856 | with bb.utils.fileslocked([self.cachefile + ".lock"]): | ||
857 | bb.utils.remove(self.cachefile) | ||
858 | bb.utils.remove(self.cachefile + "-*") | ||
859 | |||
850 | def save_extras(self): | 860 | def save_extras(self): |
851 | if not self.cachefile: | 861 | if not self.cachefile: |
852 | return | 862 | return |