summaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2014-08-24depexp: don't use undefined variable 'logging'Olof Johansson
This fixes an issue when trying to use depexp without specifying a recipe. Before change: $ bitbake -g -udepexp Traceback (most recent call last): File ".../bitbake/bin/bitbake", line 382, in <module> ret = main() File ".../bitbake/bin/bitbake", line 370, in main return ui_module.main(server_connection.connection, server_connection.events, configParams) File ".../bitbake/lib/bb/ui/depexp.py", line 201, in main logger.error(cmdline['msg']) NameError: global name 'logger' is not defined After change: $ bitbake -g -udepexp Please specify a package name for dependency graph generation. Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23cooker: tweak CookerCollectFiles::find_bbfilesBernhard Reutner-Fischer
since python-2.5 string.endswith() takes a tuple Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-22siggen: Fix a subtle bug in hash calculation for shared work tasksRichard Purdie
With a shared work task like gcc, the task can be run from a variety of different recipes which may have different virtual extensions in place. Depending on whether gcc-runtime or nativesdk-gcc-runtime's do_preconfigure task is called for example will change the sorting of the task hashes due to the way clean_basename currently works. The correct thing to do here is sort on the base filename first, then any extension when ordering the hashes. This means we do account for things like recipes with both a native and non-native dependency but we also fix the shared work case where we don't care whether it was a virtual version or not. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-22process: Further improve robustness against server shutdownRichard Purdie
Currently, if an exception occurs in an event handler, the server shuts down but the UI simply hangs. This happens in two places, firstly waiting for events and secondly, sending events to a server which no longer exists. The latter does time out, the former does not. These patches improve both code sections to check if the main server process is alive and if not, trigger things to shut down gracefully. This avoids the timeout in the command sending case too. This resolves various cases where the UI would simply hang indefintely. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-22utils: Add workaround for multiprocessing bugRichard Purdie
Our usage of multitprocessing is problematic. In particular, there is a bug in python 2.7 multiprocessing where signals are not handled until command completion instead of immediately. This adds a workaround into our wrapper function to deal with the issue. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-22command: Trigger updateCache to shut down any active parser threadsRichard Purdie
If we trigger a shutdown whilst parsing for whatever reason, in some cases we were not closing down the parser threads. This change ensures we do so. The function names are not entirely intuitive but the behaviour is more correct (and commented). The previous bug with the stdout failure would trigger this one, if there was a cold cache and parsing was required (but not otherwise). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-22knotty: Improve exception handlingRichard Purdie
Currently, IOErrors are just passed over due to the broken Exception clause. A command like "bitbake X | <invalid command>" would break stdout triggering a traceback. With these changes we print the exceptions, shut down the server gracefully and exit which is a much nicer behaviour and is less confusion to the user. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-20process: Deal with infinite looping of the serverRichard Purdie
Currently if an exception occurs, we just run the idle handler again and again, usually looping indefintely. Chances are the exception that occurred will keep occuring and this is not a good place to be. This was breaking the autobuilders with gigabytes of logs. At least improve things so the cooker shuts down gracefully when this happens. Some trace of the original problem may still be present on the console too! Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-19runqueue.py: Fix typoes/grammar in comments.Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-19fetch2/local.py: fix first line indent of search path debug outputAndre McCurdy
Make OE do_unpack logs slightly prettier. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-19daemonize.py: Non-functional comment/aesthetic fixes.Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-19runqueue.py: Correct several misspellings of "notifing".Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-02runqueue: Add sceneQueueComplete eventRichard Purdie
Its useful to have an event emitted when all of the sceneQueue tasks have completed since the metadata can hook this for processing. Therefore add such an event. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-02cooker: Get rid of duplicate 'import re'Namhyung Kim
The re module was imported at the top, no need to do it again. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-02knotty: Move second event check into a proper blockNamhyung Kim
so that it doesn't check it twice for non-empty events Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25codeparser cache improvementsRichard Purdie
It turns out the codeparser cache is the bottleneck I've been observing when running bitbake commands, particularly as it grows. There are some things we can do about this: * We were processing the cache with "intern()" at save time. Its actually much more memory efficient to do this at creation time. * Use hashable objects such as frozenset rather than set so that we can compare objects * De-duplicate the cache objects, link duplicates to the same object saving memory and disk usage and improving speed * Using custom setstate/getstate to avoid the overhead of object attribute names in the cache file To make this work, a global cache was needed for the list of set objects as this was the only way I could find to get the data in at setstate object creation time :(. Parsing shows a modest improvement with these changes, cache load time is significantly better, cache save time is reduced since there is now no need to reprocess the data and cache is much smaller. We can drop the compress_keys() code and internSet code from the shared cache core since its no longer used and replaced by codeparser specific pieces. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25cache: Optimise invalid cache file handlingRichard Purdie
If there is a corrupt/invalid cache file, we'd keep trying to reopen it. This is pointless, simplify the code paths and delete the dead file. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25cache: Don't reload the cache file since we already have this data in memoryRichard Purdie
If we're writing out merged data to disk, its safe to assume that either we loaded the data or couldn't. Loading it again is relatively pointless and time consuming. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23toasterui: fixing event.data clashAlexandru DAMIAN
This patch fixes a name collision on the event.data in the MetadataEvent class. event.data is used in the event system as a copy of "d" in certain situations, and this collision triggered a bug leading to data loss. [YOCTO #6332] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-23toaster: properly set layers when running a buildAlexandru DAMIAN
This patch enables the localhost build controller to properly set the layers before the build runs. It creates the checkout directories under BuildEnvironment sourcedir directory, and runs the build in the buildir directory. Build launch errors are tracked in the newly added BRError table. These are different from build errors, in the sense that the build can't start due to these errors. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-23toaster: add project main edit pageAlexandru DAMIAN
This is the first commit on the project main edit page. At this point we have: * the default settings for a newly created project * the ability to add targets * the ability to trigger a build command, and have the build executed Project layers now have an optional field, allowing for removal. Default meta, meta-yocto and meta-yocto-bsp layers cannot be optional. We add XHR calls for interactivity in the main page. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-23toaster: move bldcontrol initial_data fixture to codeAlexandru DAMIAN
We move the initial_data fixture to a code migration, in order to make sure that we don't overwrite modified data. The data is inserted only if no data is present, instead of always overwriting the entry. The check settings returns 0 if the check was ok. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-23toaster: improved Project modelsAlexandru DAMIAN
A layer may live in a subdirectory of a git repository, so we add a field to track this setting in the Project layers. We add the Project schedule_build function, which creates a build request from the current project configuration. We also fix an import problem with Projects in views. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-23toaster: add fields for sourcedir and builddir pathsAlexandru DAMIAN
We add explicit absolute paths for a directory where the layer sources will be checked out (sourcedir) and where the build activities will take place. Adding minimal checking when starting the application in order to make sure that BuildEnvironment (BE) settings are usable. This check is ran by the toaster script at startup. Modify the localhost bbcontroller to use the BE settings instead of trying to self-configure on checked out sources. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-23"per-package" should say "per-recipe"Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-21fetch2: Add module for ClearCase (ccrc://)Dennis Meier
The clearcase fetcher is used to retrieve files from a ClearCase (http://en.wikipedia.org/wiki/Rational_ClearCase) repository. Usage in the recipe: SRC_URI = "ccrc://cc.example.org/ccrc;vob=/example_vob;module=/example_module" SRCREV = "EXAMPLE_CLEARCASE_TAG" PV = "${@d.getVar("SRCREV").replace("/", "+")}" The fetcher uses the rcleartool or cleartool remote client, depending on which one is available. Supported SRC_URI options are: - vob (required) The name of the clearcase VOB (with prepending "/") - module The module in the selected VOB (with prepending "/") The module and vob parameters are combined to create the following load rule in the view config spec: load <vob><module> - proto http or https Related variables: CCASE_CUSTOM_CONFIG_SPEC Write a config spec to this variable in your recipe to use it instead of the default config spec generated by this fetcher. Please note that the SRCREV loses its functionality if you specify this variable. SRCREV is still used to label the archive after a fetch, but it doesn't define what's fetched. User credentials: When using cleartool: The login of cleartool is handled by the system. No special steps needed. When using rcleartool: In order to use rcleartool with authenticated users an `rcleartool login` is necessary before using the fetcher. Signed-off-by: Dennis Meier <meier.dennis@siemens.com> Reviewed-by: Roger Meier <r.meier@siemens.com> Reviewed-by: Christian Liechti <christian.liechti@siemens.com> Reviewed-by: Henrique Mendonca <henrique.mendonca@siemens.com> Reviewed-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-21command/runqueue: Fix shutdown logicRichard Purdie
If you hit Ctrl+C at the right point, the system processes the request but merrily continues building. It turns out finish_runqueue() is called but this doesn't stop the later generation and execution of the runqueue. This patch adjusts some of the conditionals to ensure the build really does stop. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-09toasterui: fix build - project identificationAlexandru DAMIAN
This patches fixes the build - project identification when running under managed mode. The build is assigned to the project from which it was triggered, and to the build request, as to simplify relationships queries in the database. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-09toaster: new project page implementationAlexandru DAMIAN
We add the logic to create a new project. This page also serves as user registration and silent login for users. Once the project is added, the main project page is displayed. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-04toaster: whitespace fixAlexandru DAMIAN
This patch is just a whitespace (end-of-line) fix. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-04toaster: add automated login in new project pageAlexandru DAMIAN
Toaster uses the Django authentication system to assign user accounts to the projects that are being created. In the current implementation, the user accounts are created/authenticated automatically, on the fly, based on the fields specified in the create new project page. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-04toaster: add project pagesAlexandru DAMIAN
We add the new project and project page skeletons. In the process, we add an identifier in the settings.py to detect whenever Toaster is running in managed mode, and a context processor to make this value available to the template processor. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-04toasterui: Show in the log that ToasterUi is ready to receive events.Dave Lerner
Issue: TA53702 It was observed that a sequence in a script such as bitbake --server-only .. bitbake --observe-only .. bitbake <some target> could generate events from the server to the observer before the observer was ready to read the events, and the early events of builds were consistently dropped. Adding a "ready" note in the log allows the script to scan for that message before proceeding to building a target. Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-04toaster: automatically enable applicationsAlexandru DAMIAN
We automatically enable local applications in INSTALLED_APPS based on detecting a models.py or views.py file. This allows Toaster extensibility by adding applications, without having to edit configuration files. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-04toaster: automatically discover urls.py filesAlexandru DAMIAN
Added code to automatically discover and add url dispatchers to the urlpattern list. This allows extension of Toaster through adding applications that will be automatically registered with the URL dispatcher. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-04toaster: remove strftime calls in filtersAlexandru DAMIAN
We remove the unneeded strftime calls in filters, as the filters can deal directly with datetime types. [YOCTO #6379] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-03fetch2/svn: Add transportuser parameterRichard Purdie
There may be a need to set the user for the transport rather than the subversion command itself. Add a parameter to the url to allow this. [YOCTO #6475] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-03lib: fix no newline at end of fileRobert Yang
Add a '\n' to the last line of the file to fix: No newline at end of file Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-03toaster: fix no newline at end of fileRobert Yang
Add a '\n' to the last line of the file to fix: No newline at end of file Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-20toaster: Fix spacing and layout in no image files notificationBelen Barros
Close the definition list before adding the notification, and restrict the notification width to avoid uncomfortable line lenghts. Signed-off-by: Belen Barros <belen.barros.pena@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-20toaster: display message if no images are generatedFarrell Wymore
Display message if no images are generated for a target. This commit was amended to have more conditions for displaying the message. [YOCTO #6094] Signed-off-by: Farrell Wymore <farrell.wymore@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-20toaster: Add performance testing scriptIonut Chisanovici
This is implemented as a django management command. For the moment the 'manage.py perf' command will track the toaster 'gui' urls http response code and load time. To use it: 1. do your toaster builds 2. ensure toaster is started 1. cd bitbake/lib/toaster 2. ln -s ../../../build/toaster.sqlite 3. ./manage.py perf Signed-off-by: Ionut Chisanovici <ionutx.chisanovici@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-20toaster: refactor the target pageFarrell Wymore
the target (packages) page had to refactored to allow the displays to differ depending on the caller namely the license manifest link. Amended to make the link from the tag rather than the pathname itself. [YOCTO #6291] [YOCTO #6079] Signed-off-by: Farrell Wymore <farrell.wymore@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-19build.py: Ensure shared work siginfo files are written to the correct locationRichard Purdie
Right now shared work signature data is saved to the non-shared directory which is confusing to everyone including bitbake. Whilst its messy, extra the stampbase data instead, which ensures the sig data is written to the correct location alongside its corresponding stamp file. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-12toaster: build control functionalityAlexandru DAMIAN
We add the build control functionality to toaster. * The bldcontrol application gains bbcontroller classes that know how to manage a localhost build environment. * The toaster UI now detects it is running under build environment controller, and update the build controller database and will shut down the bitbake server once the build is complete. * The toaster script can now run in standalone mode, launching the build controller and the web interface instead of just monitoring the build, as in the interactive mode. * A fixture with the default build controller entry for localhost is provided. [YOCTO #5490] [YOCTO #5491] [YOCTO #5492] [YOCTO #5493] [YOCTO #5494] [YOCTO #5537] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-06-12toastergui: fix built ETA calculationAlexandru DAMIAN
We fix the calculation showing the estimated time to build completion. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-06-12xmlrpc: add support for token reusingAlexandru DAMIAN
We add support to specify a connection token in the command line and in the environment variable BBTOKEN. When a client registers to a bitbake server, that client will have exclusive access to the server. The client is identified by a server-supplied token. If a client terminates, we cannot reconnect to the server as the token is lost. This patch adds the capability to specify the connection token in the command line for xmlrpc clients. This allows us to have bitbake work as an already-authenticated client with the server and resume sending commands to a server. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-06-12toaster: add function to get the database urlAlexandru DAMIAN
We add a function that returns the DATABASE_URL for the current 'default' database settings. This is useful to be able to start other toaster instances with the same database settigns as the currently running instance. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-06-12toaster: create models for bldcontrol and enable itAlexandru DAMIAN
We create the model classes that store information about triggering builds, and the available build environments. We add a fixture with a default build environment for build control, using a "build/" directory under the poky checkout directory. We enable the bldcontrol in toaster starting script and in the toaster settings as to allow the actual database to be kept in sync with the source code. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-06-12toaster: initial bldcontrol applicationAlexandru DAMIAN
The build features of Toaster will be contained into a separate application, as to modularize the Toaster project and provide multiple options for deployment. This patch adds the application as a barebone Django application in the Toaster project. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>