summaryrefslogtreecommitdiffstats
path: root/lib/bb/cookerdata.py
AgeCommit message (Collapse)Author
2017-03-11runqueue: add option to run all tasks in specific build targetMatthew McClintock
For example: $ bitbake core-image-minimal --runall unpack ... NOTE: Tasks Summary: Attempted 326 tasks of which 88 didn't need to be rerun and all succeeded. $ bitbake core-image-minimal --runall patch NOTE: Tasks Summary: Attempted 453 tasks of which 332 didn't need to be rerun and all succeeded. This can replace fetchall as well: $ bitbake core-image-minimal --runall fetch NOTE: Tasks Summary: Attempted 135 tasks of which 119 didn't need to be rerun and all succeeded. Signed-off-by: Matthew McClintock <msm-oss@mcclintock.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-19cooker: Add BB_LIMITEDDEPS supportRichard Purdie
When we're running with bitbake -b, BB_TASKDEPDATA is incorrect and limited. We really need a way to know this from the metadata and this new variable provides this in worker context. This means existing code can stop having to guess. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-21cookerdata: Convert multiconfig to use BB_CURRENT_MCRichard Purdie
People are struggling with multiconfig as the point the conf file is injected into the data store is not what people expect. We can't really use a post config since that is too late and we can't really use a pre config file since that is too early. In OE terms, we need something right around the local.conf point so it behaves in a similar way. A way to handle this is to set the new variable BB_CURRENT_MC to be the currently selected multiconfig, then the metadata itself can choose when to inject the approriate configuration. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-14command: provide a means to shut down from the client in memres modePaul Eggleton
In memory resident mode we don't really want to actually shut down since it's only the client going away. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-30bitbake: remove True option to getVarFlag callsJoshua Lock
getVarFlag() now defaults to expanding by default, thus remove the True option from getVarFlag() calls with a regex search and replace. Search made with the following regex: getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-30bitbake: remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20cookerdata.py: Catch BBHandledException, preventing a backtrace in an eventMark Hatle
The event handling 'Exception' was catching and triggering a backtrace. This trace was obscuring any errors from an event handler that had raised the BBHandledException, which should indicate do not print additional information. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16cookerdata: allow multiple passes of config re-parsingMarkus Lehtonen
[YOCTO #10188] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16cookerdata: fire ConfigParsed event after re-parseMarkus Lehtonen
[YOCTO #10188] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02cookerdata/ast: Fail gracefully if event handler function is not foundMarkus Lehtonen
[YOCTO #10186] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17bitbake: Initial multi-config supportRichard Purdie
This patch adds the notion of supporting multiple configurations within a single build. To enable it, set a line in local.conf like: BBMULTICONFIG = "configA configB configC" This would tell bitbake that before it parses the base configuration, it should load conf/configA.conf and so on for each different configuration. These would contain lines like: MACHINE = "A" or other variables which can be set which can be built in the same build directory (or change TMPDIR not to conflict). One downside I've already discovered is that if we want to inherit this file right at the start of parsing, the only place you can put the configurations is in "cwd", since BBPATH isn't constructed until the layers are parsed and therefore using it as a preconf file isn't possible unless its located there. Execution of these targets takes the form "bitbake multiconfig:configA:core-image-minimal core-image-sato" so similar to our virtclass approach for native/nativesdk/multilib using BBCLASSEXTEND. Implementation wise, the implication is that instead of tasks being uniquely referenced with "recipename/fn:task" it now needs to be "configuration:recipename:task". We already started using "virtual" filenames for recipes when we implemented BBCLASSEXTEND and this patch adds a new prefix to these, "multiconfig:<configname>:" and hence avoid changes to a large part of the codebase thanks to this. databuilder has an internal array of data stores and uses the right one depending on the supplied virtual filename. That trick allows us to use the existing parsing code including the multithreading mostly unchanged as well as most of the cache code. For recipecache, we end up with a dict of these accessed by multiconfig (mc). taskdata and runqueue can only cope with one recipecache so for taskdata, we pass in each recipecache and have it compute the result and end up with an array of taskdatas. We can only have one runqueue so there extensive changes there. This initial implementation has some drawbacks: a) There are no inter-multi-configuration dependencies as yet b) There are no sstate optimisations. This means if the build uses the same object twice in say two different TMPDIRs, it will either load from an existing sstate cache at the start or build it twice. We can then in due course look at ways in which it would only build it once and then reuse it. This will likely need significant changes to the way sstate currently works to make that possible. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17cookerdata: Simplify prefiles/postfilesRichard Purdie
The current codepaths are rather confusing. Stop passing these as parameters and use the ones from when the object is created. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02cookerdata: print an error if layer dir does not existMarkus Lehtonen
Makes it easier for user to identify problems, e.g. typos, in BBLAYERS. [YOCTO #9507] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-18Provide LAYERDIR_RE for layer.confChristopher Larson
This variable is a regex-escaped version of LAYERDIR, for safer use in BBFILE_PATTERN, so as to avoid issues with regex special characters in the layer path. [YOCTO #8402] Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-12cookerdata: Fix log messages and ensure we exitRichard Purdie
The string formatting wasn't correct and we should exit if we hit errors here similar to the other exception handlers. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-30cookerdata.py: remove slash in the endRobert Yang
It's very possible that we added layer as: BBLAYERS += "/path/to/meta/" then there would be warning: WARNING: No bb files matched BBFILE_PATTERN_core '^/path/to/meta//' This patch can fix the problem. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-29cookerdata: Improve handling of ParseErrorRichard Purdie
If local.conf contains an invalid line, e.g.: APPEND += " igor" (note the leading space) then nasty tracebacks are shown which confuse the user. Change so the parse error is simply shown without a traceback, improving the user experience. [YOCTO #9332] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-08main/runqueue: Add --setscene-only option to bitbakeRichard Purdie
Its turning out that we really need a way to have bitbake just run the setscene tasks but not any real tasks, particularly for SDK operations. Add an option for this since its pretty straight forward. This allows various nasty workarounds in OE-Core to be removed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-15ast/event/utils: Improve tracebacks to include file and line numbers more ↵Richard Purdie
correctly Currently bitbake tracebacks can have places where the line numbers are inaccurate and filenames may be missing. These changes start to try and correct this. The only way I could find to correct line numbers was to compile as a python ast, tweak the line numbers then compile to bytecode. I'm open to better ways of doing this if anyone knows of any. This does mean passing a few more parameters into functions, and putting more data into the data store about functions (i.e. their filenames and line numbers) but the improvement in debugging is more than worthwhile). Before: ---------------- ERROR: Execution of event handler 'run_buildstats' failed Traceback (most recent call last): File "run_buildstats(e)", line 43, in run_buildstats(e=<bb.build.TaskStarted object at 0x7f7b7c57a590>) NameError: global name 'notexist' is not defined ERROR: Build of do_patch failed ERROR: Traceback (most recent call last): File "/media/build1/poky/bitbake/lib/bb/build.py", line 560, in exec_task return _exec_task(fn, task, d, quieterr) File "/media/build1/poky/bitbake/lib/bb/build.py", line 497, in _exec_task event.fire(TaskStarted(task, logfn, flags, localdata), localdata) File "/media/build1/poky/bitbake/lib/bb/event.py", line 170, in fire fire_class_handlers(event, d) File "/media/build1/poky/bitbake/lib/bb/event.py", line 109, in fire_class_handlers execute_handler(name, handler, event, d) File "/media/build1/poky/bitbake/lib/bb/event.py", line 81, in execute_handler ret = handler(event) File "run_buildstats(e)", line 43, in run_buildstats NameError: global name 'notexist' is not defined ---------------- After: ---------------- ERROR: Execution of event handler 'run_buildstats' failed Traceback (most recent call last): File "/media/build1/poky/meta/classes/buildstats.bbclass", line 143, in run_buildstats(e=<bb.build.TaskStarted object at 0x7efe89284e10>): if isinstance(e, bb.build.TaskStarted): > trigger = notexist pn = d.getVar("PN", True) NameError: global name 'notexist' is not defined ERROR: Build of do_package failed ERROR: Traceback (most recent call last): File "/media/build1/poky/bitbake/lib/bb/build.py", line 560, in exec_task return _exec_task(fn, task, d, quieterr) File "/media/build1/poky/bitbake/lib/bb/build.py", line 497, in _exec_task event.fire(TaskStarted(task, logfn, flags, localdata), localdata) File "/media/build1/poky/bitbake/lib/bb/event.py", line 170, in fire fire_class_handlers(event, d) File "/media/build1/poky/bitbake/lib/bb/event.py", line 109, in fire_class_handlers execute_handler(name, handler, event, d) File "/media/build1/poky/bitbake/lib/bb/event.py", line 81, in execute_handler ret = handler(event) File "/media/build1/poky/meta/classes/buildstats.bbclass", line 143, in run_buildstats trigger = notexist NameError: global name 'notexist' is not defined ---------------- Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-27cooker: preserve pre and post configsEd Bartosh
Additional config files passed to bitbake server with --read and --postread options are rewritten by client bitbake even if it doesn't use those options. This is a show stopper for toaster as toaster command line builds are based on the assumption that server is aware of toster configs, provided by --postread option. This behaviour is fixed by preserving values of --read and --postread options when bitbake server starts and restoring them if client bitbake doesn't explicitly specify them. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-29cookerdata: Rename BBPKGS -> BBTARGETSRichard Purdie
BBPKGS is a confusing name from before we tried to straighten out our terminology. Its also a mostly unknown variable that isn't in wide use. I've been asked about it recently and before people start relying more heavily on it, I'd like to rename it BBTARGETS which better describes what it does. Its not currently in the manuals, I'd prefer to document it under the better name. I've not provided any migration path for the variable since I believe its unused currently. It allows the targets to built to be specified from a conf file in addition to those on the commandline. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-03bb.cookerdata: include useful traceback for ExpansionError/ParseErrorChristopher Larson
Show the user only the portion of the traceback which was from the metadata, nothing from bitbake's internal calls. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17cooker: ensure prefile/postfile can work in memory resident modePaul Eggleton
The prefile/postfile options weren't working in memory resident mode because they weren't being passed through to the server, so ensure that they do get passed through and that the server is reset when the values come through. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01bb.cookerdata: don't show traceback for ParseError/ExpansionErrorChristopher Larson
Tracebacks are of extremely limited usefulness in this context. The exceptions carry the necessary context already, and the user doesn't care about the calls in bitbake internals that led to an expansion or parse failure. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-19bitbake: Add explict getVar param for (non) expansionRichard Purdie
Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-19cookerdata: Allow ~ in bblayersEd Bartosh
Implemented processing of ~ in bblayer's paths if HOME environment variable is approved. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-24bin/bitbake: Create bitbake_main APIEd Bartosh
Moved most of functionality of bin/bitbake to lib/bb/main.py to be able to call bitbake from python code. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21command/cooker/knotty: Fix memres handling of command environment changesRichard Purdie
If the environment changes, we need memory resident bitbake to adapt to those changes. This adds in functionality to handle this alongside the configuration option handling code. This means that the common usage: MACHINE=X bitbake Y now works with the memory resident server. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-12add option to write offline event log fileAlexandru DAMIAN
This patch adds a "-w/--write-log" option to bitbake that writes an event log file for the current build. The name of the file is passed as a parameter to the "-w" argument. If the parameter is the empty string '', the file name is generated in the form bitbake_eventlog_DATE.json, where DATE is the current date and time, with second precision. The "-w" option can also be supplied as the BBEVENTLOG environment variable. We add a script, toater-eventreplay, that reads an event log file and loads the data into a Toaster database, creating a build entry. We modify the toasterui to fix minor issues with reading events from an event log file. Performance impact is undetectable under no-task executed builds. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-09-23knotty: Ensure commandline parameters are updated in memres serverRichard Purdie
When using options like -k, -f, -v and so on with the memory resident server, they'd currently only be set on the initial values passed to the original command. This ensures they now match those specified on the commandline for the options where this makes sense. To make this work, a command to update the options on the server side is required so this is added. [YOCTO #5292] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-30cookerdata: Improve error handlingRichard Purdie
If we see errors during parsing, firstly its bad to show a traceback for an expansion error so lets suppress this. Secondly, raise a BBHandledException instead of a SystemExit to show we've informed the user about the condition (printing a traceback in the default unknown case). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-26bitbake: Force -S option to take a parameterRichard Purdie
There is no easy way to make this change. We really need parameters for the -S (dump signatures) handling code. Such a parameter can then be used within the codebase to handle the signatures in different ways. For now, "none" is the recommended default and "printdiff" will execute the new (and more expensive) comparison algorithms. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-02bitbake.lock: Add host:port to bitbake.lock for memres serverJason Wessel
The idea is to build on the --status-only option for bitbake and expose a mechanism where the oe init scripts can easily switch between memres server and the non-memres server. In the case of the standard oe init script the following can shut down the server: if [ -z "$BBSERVER" ] && [ -f bitbake.lock ] ; then grep ":" bitbake.lock > /dev/null && BBSERVER=`cat bitbake.lock` bitbake --status-only if [ $? = 0 ] ; then echo "Shutting down bitbake memory resident server with bitbake -m" BBSERVER=`cat bitbake.lock` bitbake -m fi fi A similar function can be used to automatically detect if the server is already running for the oe memres init script. This new functionality allows for the memres init script to be started in a new shell and connect up to an alaready running server without seeing the error of trying to start the server multiple times. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-18bitbake: cooker,xmlrpc,servers: implement CookerFeaturesAlexandru DAMIAN
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>
2013-08-30cookerdata: Allow bblayers.conf to be found using BBPATHRichard Purdie
It should be possible to run a build anywhere on the filesystem and have bitbake find the correct build directory if its set somehow. The BBPATH variable makes perfect sense for this usage. Therefore use any available value of BBPATH to search for conf/bblayers.conf before walking the parent directory structure. This restores the option of being able to run bitbake from anywhere if the user has set things up to operate in that environment. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30cookerdata: Set TOPDIR when using bblayers.confRichard Purdie
By definition, bblayers.conf is at the top of the build tree. We'd like to support running bitbake anywhere within that build tree but TOPDIR gets set to wherever cwd is. Change the code to reset TOPDIR to the top of the build directory. This shouldn't break anything but does make the system more usable. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28cookerdata: Improve message if BBPATH is unset and bblayers.conf not foundRichard Purdie
If BBPATH isn't set and bblayers.conf isn't found, improve the message shown to the user to help their understanding of what the problem might be. [YOCTO #3271] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> A
2013-06-14bitbake: Add event mask flag supportBogdan Marinescu
Add a flag to event handlers which lists the events a given handler wishes to process. By default event handlers recieve all events but this means we can stop running code in many cases if we know it doesn't want the event. This is part of the fix for YOCTO #3812, but implements filtering only for class event handlers; the other part (events filter for UIs) will be the subject of a different patch. Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-12runqueue: Split runqueue to use bitbake-workerRichard Purdie
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>
2013-05-30cookerdata: Fix tinfoil by adding missinge extra_caches defaultRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30bitbake: move extra cache collection out of cookerAlexandru DAMIAN
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>
2013-05-24cooker/cookerdata: Improve configuration object handlingRichard Purdie
Originally it seemed like a good idea to keep the parameters around. Having seen this in real life use, its incorrect, we should pull all the data we need into the cooker's configuguration and then use this to build the datastore. Being able to just build the datastore from the parameters seemed like a good idea but having a dummy cooker configuration object is now looking like the better option. This also fixes failures in hob since the parseFiles command can call into cooker directly now and reset the configuration prefiles and postfiles at will, rather than the indirect calls before which were breaking the datastore (e.g. BBPATH wasn't set). The cleanup this allows in tinfoil illustrates how this change makes more sense. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-23cooker/cookerdata/event: Improve class handlers managementRichard Purdie
Similarly to the execution context changes, establish better lifetime management API of the class event handlers. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-23cooker/cookerdata/utils: Improve context managementRichard Purdie
The current execution context management for bitbake is ugly and the use of a global variable is nasty. Fixing that is hard, however we can improve things to start to establish an API for accessing and changing that context. This patch also adds in an explicit reset of the context when we reparse the configuration data which starts to improve the lifecycle of the data in setups like hob. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22cookerdata: rename _parse to parse_config_filePaul Eggleton
We use this externally in the OE layer index update script, so it shouldn't really be named as an internal function. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-21bitbake/cookerdata: Explicitly specify cooker configuration optionsRichard Purdie
As the code stands today its hard to know which configuration variables are used by which parts of the system. Some are used by the UIs, some by bin/bitbake itself, some by cooker. This patch changes the configuration to just contain the variables cooker uses, and changes bin/bitbake to access the variables it needs directly which hopefully lets us start to untangle this mess. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-21cooker: Split configuration parsing code into cookerdataRichard Purdie
In order to have a memory resident bitbake and to allow task execution, we need to be able to rebuild the base configuration without a cooker. This moves the code into its own class so it can be built independently. The interface is less than ideal here but I didn't want to add parsing methods a subclassed DataSmart, at least until we've experimented further with this code and are certain that makes sense. At the very least, the methods are ugly and need cleaning up. Spliting the code out seems to be the right thing to do though and should unblock various activities on BitBake so I believe this code is a step in the right direction. Based on a patch from Alexandru Damian <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-21cooker: Move commandline parsing back into the UI/cookerdataRichard Purdie
Building up a set of actions for the server is tricky since we depend upon the commandline but fall back to values from the datastore. We should be able to build a datastore without a commandline and vice versa. Ultimately the UI should send the commands to the server. This patch amounts to code rearranging, moving the heavy lifting to the UI, though a helper in the configuration option. This will need further cleanup/tweaking but this should be the only update needed to the UIs. The code now queries the server for any missing data should it need to. This code allows various knowledge of configuration variables to move to the UI side only, partcularly pkgs_to_build but also all the command specifiers. It should also be possible to move cmd eventually, I'm just unsure if any callers call the commands expecting this to default to something sane right now. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-21bitbake: Create cookerdata splitting config from cooker and bin/bitbakeRichard Purdie
Currently the UI and server configuration is one big incestuous mess. To start to untangle this we creater cookerdata, a new module which contains various confiuration modules and the code for building the base datastore. To start with we add a ConfigParameters() class which contains information about both the commandline configuration and the original environment. The CookerConfiguration class is created to contain the cooker.configuration options. This means we can transfer new paramters to the server over something like XMLRPC and then build a new configuration from these on the server. Based on a patch from Alexandru Damian <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>