summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2013-09-18 13:15:47 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-18 15:14:13 +0100
commit98e594837aab89ea042cfa9f3740d20a661b14e2 (patch)
treecdacdebc0508f6d056d63ac81703cbff16d993fa /bin
parent8a42d082315bd6ce091d006bf83476db257fa48b (diff)
downloadbitbake-98e594837aab89ea042cfa9f3740d20a661b14e2.tar.gz
bitbake: cooker,xmlrpc,servers: implement CookerFeatures
Implementing feature set selection that allows a client to enable specific features in the server at connection time. Only enabling of features is supported, as there is no way to safely remove data loaded into the cooker. Once enabled, a feature will remain enabled for the life of the cooker. Client-server connection now supports specifying the feature set required by the client. This is implemented in the Process server using a managed proxy list, so the server cooker will now load dynamically needed features based on what client connects to it. In the XMLRPC server the feature set is requested by using a parameter for registerUIHandler function. This allows observer-only clients to also specify features for the server. The server code configuration now is completly separated from the client code. All hardcoding of client knowledge is removed from the server. The extra_caches is removed as the client can now specify the caches it needs using the feature. The UI modules now need to specify the desired featureSet. HOB is modified to conform to the featureSet specification. The only feature available is CookerFeatures.HOB_EXTRA_CACHES which forces loading the bb.cache_extra:HobRecipeInfo class. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bitbake25
1 files changed, 5 insertions, 20 deletions
diff --git a/bin/bitbake b/bin/bitbake
index 60c4b96c7..b4506efb5 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -75,18 +75,6 @@ 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")
@@ -302,25 +290,22 @@ def main():
# Clear away any spurious environment variables while we stoke up the cooker
cleanedvars = bb.utils.clean_environment()
- # Collect all the caches we need
- if configParams.server_only:
- configuration.extra_caches = gather_extra_cache_data()
- else:
- configuration.extra_caches = getattr(ui_module, "extraCaches", [])
-
if not configParams.remote_server:
# we start a server with a given configuration
server = start_server(servermodule, configParams, configuration)
else:
- # we start a stub server that is actually a XMLRPClient to
+ # we start a stub server that is actually a XMLRPClient that connects to a real server
server = servermodule.BitBakeXMLRPCClient(configParams.observe_only)
server.saveConnectionDetails(configParams.remote_server)
logger.removeHandler(handler)
if not configParams.server_only:
+ # Collect the feature set for the UI
+ featureset = getattr(ui_module, "featureSet", [])
+
# Setup a connection to the server (cooker)
- server_connection = server.establishConnection()
+ server_connection = server.establishConnection(featureset)
# Restore the environment in case the UI needs it
for k in cleanedvars: