summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-01-26 15:34:31 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-18 07:41:16 +0000
commit0cdf1934fd218125ab751145329494f662fcd699 (patch)
treeeeb4081e1ee4e36dede715e6b9ff0f9c6507d67f /bitbake
parentca552bb4b1d877193ba6235e6216d06b984c62db (diff)
downloadpoky-0cdf1934fd218125ab751145329494f662fcd699.tar.gz
bitbake: MultiProcessCache: make cache filename configurable
If no cache file name is given a default from class variable is used, like before. (Bitbake rev: 2602a312818f564961de7dfa63c429d45ff9e5ac) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cache.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 55283b03d6..063ab15e1b 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -755,13 +755,14 @@ class MultiProcessCache(object):
755 self.cachedata = self.create_cachedata() 755 self.cachedata = self.create_cachedata()
756 self.cachedata_extras = self.create_cachedata() 756 self.cachedata_extras = self.create_cachedata()
757 757
758 def init_cache(self, d): 758 def init_cache(self, d, cache_file_name=None):
759 cachedir = (d.getVar("PERSISTENT_DIR", True) or 759 cachedir = (d.getVar("PERSISTENT_DIR", True) or
760 d.getVar("CACHE", True)) 760 d.getVar("CACHE", True))
761 if cachedir in [None, '']: 761 if cachedir in [None, '']:
762 return 762 return
763 bb.utils.mkdirhier(cachedir) 763 bb.utils.mkdirhier(cachedir)
764 self.cachefile = os.path.join(cachedir, self.__class__.cache_file_name) 764 self.cachefile = os.path.join(cachedir,
765 cache_file_name or self.__class__.cache_file_name)
765 logger.debug(1, "Using cache in '%s'", self.cachefile) 766 logger.debug(1, "Using cache in '%s'", self.cachefile)
766 767
767 glf = bb.utils.lockfile(self.cachefile + ".lock") 768 glf = bb.utils.lockfile(self.cachefile + ".lock")