summaryrefslogtreecommitdiffstats
path: root/bin/bitbake
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2013-05-28 12:49:55 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-30 10:19:13 +0100
commitf0b54280a6bce522508e4741e5f507bc284113a8 (patch)
tree3b26769549686b13c8d6c0dbd17c18065bc3c6f3 /bin/bitbake
parentf49341a9599d971829ef65b2b02732543740a3c9 (diff)
downloadbitbake-contrib-f0b54280a6bce522508e4741e5f507bc284113a8.tar.gz
bitbake: move extra cache collection out of cooker
The collection of the extra caching data should not be performed by the cooker, but supplied to it. This patch will also streamline the code for launching servers without a UI attached. Based on a patch by Bogdan Marinescu <bogdan.a.marinescu@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin/bitbake')
-rwxr-xr-xbin/bitbake18
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/bitbake b/bin/bitbake
index 86cf3a8ae..f44543de2 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -75,6 +75,18 @@ def get_ui(config):
sys.exit("FATAL: Invalid user interface '%s' specified.\n"
"Valid interfaces: depexp, goggle, ncurses, hob, knotty [default]." % interface)
+def gather_extra_cache_data():
+ extra = []
+ interfaces = ['depexp', 'goggle', 'ncurses', 'hob', 'knotty']
+ for i in interfaces:
+ try:
+ ui = __import__("bb.ui." + i, fromlist = [i])
+ if hasattr(ui, "extraCaches"):
+ extra = extra + ui.extraCaches
+ del ui
+ except:
+ pass
+ return extra
# Display bitbake/OE warnings via the BitBake.Warnings logger, ignoring others"""
warnlog = logging.getLogger("BitBake.Warnings")
@@ -237,6 +249,12 @@ def main():
try:
configuration.setServerRegIdleCallback(server.getServerIdleCB())
+
+ if configParams.server_only:
+ configuration.extra_caches = gather_extra_cache_data()
+ else:
+ configuration.extra_caches = getattr(ui_module, "extraCaches", [])
+
cooker = bb.cooker.BBCooker(configuration)
server.addcooker(cooker)