summaryrefslogtreecommitdiffstats
path: root/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-12 17:48:51 +0100
commitb2e26f1db28d74f2dd9df8ab4ed3b472503b9a5c (patch)
treece5edd4913e340a5b8f0dbbfb66ed8487c8b4c07 /lib/bb/cache.py
parentad8bf10d873abb94d987860a3f6d06b134fb8a99 (diff)
downloadopenembedded-core-contrib-b2e26f1db28d74f2dd9df8ab4ed3b472503b9a5c.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/cache.py')
-rw-r--r--lib/bb/cache.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index fb0f40c602..b99fa99cfb 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -724,7 +724,6 @@ class CacheData(object):
for info in info_array:
info.add_cacheData(self, fn)
-
class MultiProcessCache(object):
"""
BitBake multi-process cache implementation
@@ -746,13 +745,18 @@ class MultiProcessCache(object):
self.cachefile = os.path.join(cachedir, self.__class__.cache_file_name)
logger.debug(1, "Using cache in '%s'", self.cachefile)
+ glf = bb.utils.lockfile(self.cachefile + ".lock")
+
try:
with open(self.cachefile, "rb") as f:
p = pickle.Unpickler(f)
data, version = p.load()
except:
+ bb.utils.unlockfile(glf)
return
+ bb.utils.unlockfile(glf)
+
if version != self.__class__.CACHE_VERSION:
return