summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
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:20:32 +0100
commite6a1b33bc87ea205b5d4ea8cf29159fc6ddd8853 (patch)
treef05d56f8b41b1c36fcea581cc2adcbfd5da0e49b /bitbake/bin
parente09a15927714362866297c3a7a2992506ccf4f75 (diff)
downloadpoky-e6a1b33bc87ea205b5d4ea8cf29159fc6ddd8853.tar.gz
bitbake: 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> (Bitbake rev: f0b54280a6bce522508e4741e5f507bc284113a8) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake18
1 files changed, 18 insertions, 0 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 86cf3a8ae8..f44543de2c 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -75,6 +75,18 @@ def get_ui(config):
75 sys.exit("FATAL: Invalid user interface '%s' specified.\n" 75 sys.exit("FATAL: Invalid user interface '%s' specified.\n"
76 "Valid interfaces: depexp, goggle, ncurses, hob, knotty [default]." % interface) 76 "Valid interfaces: depexp, goggle, ncurses, hob, knotty [default]." % interface)
77 77
78def gather_extra_cache_data():
79 extra = []
80 interfaces = ['depexp', 'goggle', 'ncurses', 'hob', 'knotty']
81 for i in interfaces:
82 try:
83 ui = __import__("bb.ui." + i, fromlist = [i])
84 if hasattr(ui, "extraCaches"):
85 extra = extra + ui.extraCaches
86 del ui
87 except:
88 pass
89 return extra
78 90
79# Display bitbake/OE warnings via the BitBake.Warnings logger, ignoring others""" 91# Display bitbake/OE warnings via the BitBake.Warnings logger, ignoring others"""
80warnlog = logging.getLogger("BitBake.Warnings") 92warnlog = logging.getLogger("BitBake.Warnings")
@@ -237,6 +249,12 @@ def main():
237 249
238 try: 250 try:
239 configuration.setServerRegIdleCallback(server.getServerIdleCB()) 251 configuration.setServerRegIdleCallback(server.getServerIdleCB())
252
253 if configParams.server_only:
254 configuration.extra_caches = gather_extra_cache_data()
255 else:
256 configuration.extra_caches = getattr(ui_module, "extraCaches", [])
257
240 cooker = bb.cooker.BBCooker(configuration) 258 cooker = bb.cooker.BBCooker(configuration)
241 259
242 server.addcooker(cooker) 260 server.addcooker(cooker)