summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cache.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-07 18:11:09 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-14 12:52:56 +0100
commitd0f0e5d9e69cc22f0c6635c7e416de93660c6bca (patch)
tree1877f962137e31bbf93be5c13763488fb2321886 /bitbake/lib/bb/cache.py
parentcd7b7de91a98e712e796a8d6a3a8e3741950396e (diff)
downloadpoky-d0f0e5d9e69cc22f0c6635c7e416de93660c6bca.tar.gz
bitbake: runqueue: Split runqueue to use bitbake-worker
This is a pretty fundamental change to the way bitbake operates. It splits out the task execution part of runqueue into a completely separately exec'd process called bitbake-worker. This means that the separate process has to build its own datastore and that configuration needs to be passed from the cooker over to the bitbake worker process. Known issues: * Hob is broken with this patch since it writes to the configuration and that configuration isn't preserved in bitbake-worker. * We create a worker for setscene, then a new worker for the main task execution. This is wasteful but shouldn't be hard to fix. * We probably send too much data over to bitbake-worker, need to see if we can streamline it. These are issues which will be followed up in subsequent patches. This patch sets the groundwork for the removal of the double bitbake execution for psuedo which will be in a follow on patch. (Bitbake rev: b2e26f1db28d74f2dd9df8ab4ed3b472503b9a5c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cache.py')
-rw-r--r--bitbake/lib/bb/cache.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index fb0f40c602..b99fa99cfb 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -724,7 +724,6 @@ class CacheData(object):
724 for info in info_array: 724 for info in info_array:
725 info.add_cacheData(self, fn) 725 info.add_cacheData(self, fn)
726 726
727
728class MultiProcessCache(object): 727class MultiProcessCache(object):
729 """ 728 """
730 BitBake multi-process cache implementation 729 BitBake multi-process cache implementation
@@ -746,13 +745,18 @@ class MultiProcessCache(object):
746 self.cachefile = os.path.join(cachedir, self.__class__.cache_file_name) 745 self.cachefile = os.path.join(cachedir, self.__class__.cache_file_name)
747 logger.debug(1, "Using cache in '%s'", self.cachefile) 746 logger.debug(1, "Using cache in '%s'", self.cachefile)
748 747
748 glf = bb.utils.lockfile(self.cachefile + ".lock")
749
749 try: 750 try:
750 with open(self.cachefile, "rb") as f: 751 with open(self.cachefile, "rb") as f:
751 p = pickle.Unpickler(f) 752 p = pickle.Unpickler(f)
752 data, version = p.load() 753 data, version = p.load()
753 except: 754 except:
755 bb.utils.unlockfile(glf)
754 return 756 return
755 757
758 bb.utils.unlockfile(glf)
759
756 if version != self.__class__.CACHE_VERSION: 760 if version != self.__class__.CACHE_VERSION:
757 return 761 return
758 762