summaryrefslogtreecommitdiffstats
path: root/bin
AgeCommit message (Collapse)Author
2014-01-07toaster: add two-stage commit startup logicAlexandru DAMIAN
Toaster start script lunches multiple process components of the toaster system. This patch adds logic into the startup script to safely fail startup and do proper cleanup on any error that may happen during system start. Bitbake needs to return 0 if it will successfully lunches the server-mode. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20Update to version 1.21.1 for masterRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-09toaster: migrate orm models to SouthAlexandru DAMIAN
As Toaster advances, database schema alteration will force users to delete old versions and lose all data collected. In order to prevent this, and to allow database updates to happen without having to delete old data, we use South to handle migrations for the ORM application which stores the Toaster data. [YOCTO #5559] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2013-12-09toaster: update to Django 1.5Alexandru DAMIAN
In order to remain up to date with the relevant technologies, Toaster is updated with this patch to Django 1.5. This also makes headways to allow usage of emerging Django-related technologies. Changes include the startup script Django version check, usage of TemplateView instead of deprecated simple function to do redirects, and update to the new form of the _url_ template tag. Support for Django 1.4.5 is now deprecated. [YOCTO #5558] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
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-12-02bitbake, xmlrpc.py: Implement memory resident auto port configuration/restartJason Wessel
This patch adds the ability to dynamically select a port for the bitbake memory resident server when the BBSERVER port is set to -1. This allows for running multiple instances of the bitbake memory resident server on the same system in different build directories. The client portion of the bitbake instance can also request that the server automatically start when using the auto port feature. This is to deal with a bitbake instance that eventually times out and exits or that has died for some unknown reason. The new functionality allows for lazy startup of the server after sourcing the init script for the memory resident functionality. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-02bitbake: Add --status-only optionJason Wessel
The --status-only option is purely to check the health of the server. The idea is to use it from the oe environment script so as to know if the server needs to be started or not. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-26bitbake: Share BB_TASKDEPDATA with tasksRichard Purdie
Currently tasks have no knowledge of which other tasks they depend upon. This makes it impossible to do at least two things which would be desirable/interesting: a) Have the ability to create per recipe sysroots b) Allow the aclocal files to be present only for the entries in DEPENDS (directly and indirectly) By exporting task data through this new variable, tasks can inspect their dependencies and then take actions based upon this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-22bitbake-layers: avoid loading configuration when not neededPaul Eggleton
In recent versions of bitbake, it is not possible to initialise a BBCooker object without having it load the configuration first. Thus we should avoid creating the Tinfoil object here in bitbake-layers which does that internally until we actually need to, so you can run "bitbake-layers help" and not have to wait several seconds for the output. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-22runqueue/bitbake-worker: Fix dry run fakeroot issuesRichard Purdie
When using the dry run option (-n), bitbake would still try and fire a specific fakeroot worker. This is doomed to failure since it might well not have been built. Add in some checks to prevent the failures. [YOCTO #5367] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-01toaster: enable required classes in the toaster startup scriptAlexandru DAMIAN
In order to use toaster, now you have to set INHERIT+="toaster buildhistory" To keep it simple, I've done some changes in order to automate it. When toaster is started, this line is added to a new file called toaster.conf. This file is passed to the bitbake server with the --postread parameter. Based on a patch by Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-01toaster: server shutdown on terminal exitAlexandru DAMIAN
If the terminal where the server was started is closed, the bitbake server should shutdown. Currently the system is left in hanging state. This patch uses "trap" command to make sure the servers are closed on terminal exit. [YOCTO #5376] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18toaster: add toaster code to bitbakeAlexandru DAMIAN
This patch adds the Toaster component to Bitbake. Toaster is a module designed to record the progress of a Bitbake build, and data about the resultant artifacts. It contains a web-based interface and a REST API allowing post-facto inspection of the build process and artifacts. Features present in this build: * toaster start script * relational data model * Django boilerplate code * the REST API * the Simple UI web interface This patch has all the development history squashed together. Code portions contributed by Calin Dragomir <calindragomir@gmail.com>. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-10-14bitbake: Update post 1.20 to development versionRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04bitbake-dumpsig: introduce command line and error handlingPaul Eggleton
This utility doesn't take any special arguments, but it's nice if it at least knows how to deal with no arguments, --help and errors properly. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04bitbake-diffsigs: improve error handlingPaul Eggleton
* Set up a logger independent of BitBake so we can log errors ourselves * Handle common errors without printing a traceback Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04bitbake-diffsigs: refactor argument parsing slightlyPaul Eggleton
* Use OptionParser to parse the two options to -t rather than trying to pick them out ourselves. * Add a description shown with --help output Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04bitbake-diffsigs: handle if task name is specified without do_ prefixPaul Eggleton
Adjust the task name automatically if the -t option is specified with a task name that doesn't start with do_ (e.g. "configure" instead of "do_configure"). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04bin/bitbake: Clarify server error messageRichard Purdie
Getting an error message about --remote-server being set when really BBSERVER was is confusing, clarify the message. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04bin/bitbake: Clear ui-queue when starting a serverRichard Purdie
When starting a server we don't want to show the debug event queue which is reserved for when when errors have occurred. This patch copies the UI code to ensure the user doesn't see confusing output. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04bin/bitbake: No need to show tracebacks for BBHandledExceptionsRichard Purdie
For BBHandledExceptions, we've already displaced a sensible error to the user so we don't need to do it again. Just exit with an error value. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04bin/bitbake: Catch establish connection log messagesRichard Purdie
If for example you try "bitbake -m" with an invalid BBSERVER, error messages are not displayed. This change ensures logging is in place to catch and display such errors. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-24bitbake: Update to version 1.20.0Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22bin/bitbake: Improve --help textRichard Purdie
The --help text was rather inconsistent in style and plain incorrect in places, using confusing terminology in others. I guess most people know what the options do and don't read this but its confusing to new users. This updates it to use the terms recipe and task consistently, remove the references to stage, bbread and generally try and make the output more useful. [YOCTO #4856] 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-09-06bitbake: Ensure ${DATE} and ${TIME} are consistentPeter Kjellerstedt
Due to the worker split the ${DATE} and ${TIME} variables could end up with different values for different workers. E.g., a task like do_rootfs that is run within a fakeroot environment had a slightly different view of the time than another task that was not fakerooted which made it impossible to correctly refer to the image generated by do_rootfs from the other task. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-04bitbake-worker: ensure BUILDNAME is available during executionPaul Eggleton
BUILDNAME is set from cooker by default, so since the worker split it will not be set when executing functions. In OpenEmbedded this results in /etc/version (which is populated from BUILDNAME) not having any content. Pass this variable value through to the worker explicitly to fix the issue. Fixes [YOCTO #4818]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-31bitbake-worker: import needed signal moduleValentin Popa
bitbake-worker makes use of the signal module but it doesn't import it. This patch fixes the issue. [YOCTO #4750] Signed-off-by: Valentin Popa <valentin.popa@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17bitbake: read BBSERVER environement for remote serverAlexandru DAMIAN
This change allows bitbake to connect to a remote server by reading the BBSERVER environment variable and effecting the config. Basically a shortcut to the command line parameters. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17knotty, bitbake: add option to terminate a remote serverAlexandru DAMIAN
I add an option to terminate a remote server gracefully as not to need a kill command. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17knotty, xmlrpc: add observer-only modeAlexandru DAMIAN
I add an observer only mode for the knotty UI and the XMLRPC server that will allow the UI to register a callback with a server in order to receive events. The observer-UI is able to send read-only commands to the server, and also is able to register as an event handler. Read-only commands are the commands that do not change the state of the server and have been marked as such in the command module. The observer can switch to a full client if it calls addClient at any time, and the server has no other client running. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-12bitbake: Update version to 1.19.1Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-12prserv: Adapt autostart to bitbake-workerRichard Purdie
With the change to bitbake-worker we need to ensure the workers know how to contact the PR service, the magic 0 port and singleton is no longer enough. 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-06-10bitbake-layers: fix for move of data object to cookerPaul Eggleton
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-06bitbake: Improve remote server handlingAlexandru DAMIAN
Two fixes in bitbake related to running remote servers - * can now specify correctly the bind port * the information in print conforms to common server infrastructure Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30bitbake: xmlrpc remote serverAlexandru DAMIAN
Added code in XMLRPC server that creates a stub local server for a client-only connection and is able to connect to a remote server, and receive events from the remote server. Added the option to start a client with a remote server in bitbake. Original code 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-30bitbake: move start server code in a separate functionAlexandru DAMIAN
This is a code sanitization targeted at making further server-related changes easier (launch a server separately or creating a mockup-server) to do. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> 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-30bitbake: retrieve the entire ui module in launcherAlexandru DAMIAN
Slight change in bitbake as to retrieve the entire UI module for further processing instead of just the main function. 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-28server/bitbake: Remove launchUI methodRichard Purdie
With the removal of the none server type, we can remove the launchUI method and simplify the code slightly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-28server: Remove none serverRichard Purdie
The process server backend has been serving well as the default for a long time now and the UI model is much better thought out that it used to be. With the move to make bitbake a memory resident process, the none server is now looking rather pointless and complicates the code needlessly. Lets therefore now remove it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24bitbake-layers: fix show-appends and flatten for recent cooker changesPaul Eggleton
Fixes the show-appends and flatten subcommands for recent refactoring in cooker. [YOCTO #4536] [YOCTO #4535] Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22bitbake-layers: fix for move of calc_bbfile_priority within cookerPaul Eggleton
calc_bbfile_priority is now in CookerCollectFiles which can be accessed on the collection attribute of a cooker instance. Fixes [YOCTO #4513]. 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: 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>
2013-05-21bin/bitbake: Improve exception handlingRichard Purdie
Due to the internal event processing, this excepting handler usually raises an Empty error, masking the underlying failure. Ensure the original exception is raised. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-14bin/bitbake: Fix queue import for pyhton 2 and 3Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-13cooker/bitbake-layers/tinfoil: Fix recipecache typoRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>