summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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-10-04bitbake/hob: removing extra parameters from conf files using hobCristiana Voicu
In Hob settings, there is a tab to add/remove extra settings. This patch implements a way to "remove" variables from conf files, through bitbake. But, to keep the history assigment of the variables synchronized, instead of removing, it replaces the lines with blank lines. [YOCTO #5284] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04HOB: MACHINE should be saved in conf files using ?=Valentin Popa
MACHINE var is saved using early assignment operator. Calling MACHINE=x bitbake core-image-... works properly. Comment "#added by bitbake" is replaced with "#added by hob". [YOCTO #5070] Signed-off-by: Valentin Popa <valentin.popa@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04utils: use logger.warn instead of print in copyfileRoss Burton
print disappears into the ether, so use logger.warn and clean up the messages. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-02lib/bb/monitordisk.py: fix spelling in error textErik Botö
Signed-off-by: Erik Botö <erik.boto@pelagicore.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-27HOB: Busy cursor when saving configurationValentin Popa
Display a busy cursor while the configuration is saved. [YOCTO #4846] Signed-off-by: Valentin Popa <valentin.popa@intel.com> 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-22tests/data: Whitespace in key names is a really bad ideaRichard Purdie
The parser never has supported it, the datastore API did happen to work but whitespace in key names is a really bad idea and not something I think we should encourage or support. Fix test case failures after excplitly ignoring it for variable expansion purposes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22data_smart: Variable references don't contain newlines, spaces or tabsRichard Purdie
The code is happily trying to expand variable names containing newlines, spaces and tabs which are illegal characters in variable names. This patch stops it doing this. This will change dependency checksums since some rather weird dependencies were being attempted to be expanded. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22hob: populate "Save image" dialog when saving changes to a custom image recipeCristiana Voicu
If my build starts from a YP standard image recipe, the 'Save image recipe' dialog should be empty. If my build starts from a custom image recipe, the 'Save image recipe' dialog should populate the 'Name' and 'Description' fields with the values set for the custom image recipe. [YOCTO #5004] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> 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-22build: Add BB_TASK_NICE_LEVEL to task codeRichard Purdie
On Linux its not possible for processes to regain a previous nice level after it has changed. Its therefore not possible to have a core low priority and then raise the priorities of individual tasks. This variable allows us to do something like: BB_TASK_NICE_LEVEL = "5" BB_TASK_NICE_LEVEL_task-testimage = "0" to give priority to specific tasks which the BB_NICE_LEVEL functionality doesn't give us the option of. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-18bitbake: runqueue: add task hash to Queue eventsAlexandru DAMIAN
Adding the sstate-related hash for all runqueue and scenequeue tasks, as it's needed in the WebHob data. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-18bitbake: event: adding generic event for metadata usageAlexandru DAMIAN
Adding the generic bb.event.MetadataEvent that is targeted specifically at metadata usage. This is needed in order to let the metadata code send and receive events during asynchrous execution without having to define each event specifically in Bitbake. Metadata code should subscribe to and fire the MetadataEvent in order to communicate asynchronously, and identify the object using event.type field, and parse the data in the event.data field. Knotty UI will ignore these event by default. This deprecates RequestPackageInfo/PackageInfo, and that event pair will be removed in the future. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-18bitbake: cooker, command: add a command to return global dataAlexandru DAMIAN
Adding the 'getAllKeysWithFlags' read-only command that will return a dump of the global data state, together with specified flags for each key. The flag list is passed in as the first parameter to the command. This will be used by UI clients to get the build configuration. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-18bitbake: cooker: get extra information from recipe cacheAlexandru DAMIAN
The loaded cache modules may add extra attributes to the recipecache, that will be populated by the cache classes required by the UI. These attributes will be used by the UI to display relevant information. Adds cachefields cache class field to specify for each cache class which attributes will be set in the recipecache. Adds code to automatically expand depends tree with the fields exported by the extra cache class. Fixes a cache field name in the HOB UI. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-18bitbake: build, runqueue: adds info to the *runQueue* eventsAlexandru DAMIAN
This patch adds task identifying information for all runQueue and sceneQueue events, and for bb.build.Task* events. This will allow matching event to specific tasks in the UI handlers processing these events. Adds RunQueueData functions to get the task name and task file for usage with the runQueue* events. Adds taskfile and taskname properties to bb.build.TaskBase. Adds taskfile and taskname properties to the *runQueue* events Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-18bitbake: cooker,runqueue: send the task dependency treeAlexandru DAMIAN
Adding a CookerFeature that allows UIs to enable receving a dependency tree once the task data has been computed and the runQueue is ready to start. This will allow the clients to display dependency data in an efficient manner, and not recompute the runqueue specifically to get the dependency data. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.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-09-18data_smart: Fix variable reference issuesRichard Purdie
The change to use the expansion cache in VariableParse was incorrect as it was adding in references it shouldn't have been. This patch corrects the codepaths and ensures the references are correct. The cache version is bumped since the previous bug could have leave to invalid checksum calculations and a clean cache is therefore desireable. The impact of the bug was that sstate was not getting reused when it should and some tasks were also being rerun when they should not have been. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-18cooker: return a copy checkPackagesRichard Purdie
The syntax used for checkPackages implies a copy is returned but it did not do so. Make it so. This is fixes universe builds where error messaages were being shown but there should have only been warnings. [YOCTO #5222] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17usermanual.xml: Two new sections added to BitBake "Description"Scott Rifenbark
1. Added a new section "Appending and Prepending (override style syntax)". This section shows how the append and prepend operators work using the override style syntax. 2. Added a new section "Removing (override style syntax)". This section describes the new "_remove" operator. Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17Revert "bb.fatal: Raise a BBHandledException instead of exiting"Richard Purdie
Sanity test failures are no longer fatal with this change so whilst its the right idea, the code paths need more work. This reverts commit a50017ba71250e1710a6425b60ac7e3f03d88295.
2013-09-17bb.fatal: Raise a BBHandledException instead of exitingRichard Purdie
With new bitbake UIs having the cooker exit at 'random' points in the codebase is problematic. This patch raises an exception which matches the siutation instead. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17data: Optimise flag exclusion list handlingRichard Purdie
Move the variable lookup to the outer loop for performance, replacing a now unneeded parameter (after the previous changes). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17data: Optimise flag lookup in build_dependenciesRichard Purdie
When looking up flag variable dependencies, large chunks of the function aren't needed. Optimise the function flow accordingly for speed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17data: Optimise build_dependencies a littleRichard Purdie
Instead of multiple calls to getVarFlag, make one call to getVarFlags, only expanding the flags that need to be expanded. This improves performance. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17data_smart: Cache the fact a variable accesses another even if its unsetRichard Purdie
If a variable references another but it isn't set at present, the reference wasn't stored. It really should be marked as a reference and the higher level dependency code can handle as appropriate. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17data_smart: Allow flags to use the expand cacheRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17data_smart: Allow expansion of flags in getVarFlagsRichard Purdie
Allow a list of flags to expand to be passed into getVarFlags. This is useful within bitbake itself to optimise performance of the dependency generation code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17data_smart: Add explict None checksAlexandru DAMIAN
Simple if xxx checks end up calling len(xxx). We're interested in the specific case of None which means we can break out the iterator much earlier after the first item. This adds in the specific tests for None in what is a hot path in the data store code which gives small performance gains. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17data: Cache an list of export variablesRichard Purdie
Compute a cache of the list of potential export variables so that we don't have to compute the list from scratch. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17data: Use direct iteration, not keys()Richard Purdie
Profiling shows the creation of keys() has overhead and we're better using an iterator rather than the memory associated with the huge list of keys when iterating the whoe datastore. We minimise the number of times we do this to twice only per recipe. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17data_smart: use the expand_cache in VariableParseRichard Purdie
When in VariableParse, use the expand_cache if possible rather than looking up data. Ultimately it would come from the same place but this short cuts a heavily used code block for speed improvements. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17data_smart: Improve variable expansion regexpRichard Purdie
Debugging showed the variable expansion regexp was catching python expressions (starting with @). Since these are caught by their own dedicated regexp, stop matching these for the plain variable expansion for small performance improvements. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17siggen: Use lookup cache exclusivelyRichard Purdie
All the values we need are already guaranteed to be in the lookupcache so rather than fetch variables again, just use the cache. This gives a small performance improvement and simplifies the code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17data: Be explicit in data_db checkRichard Purdie
The if statement current causes the size of parent to be calcuated which is like a len() operation on a datastore. Since we're only interested whether the value is none, checking explictly for this gives a small performance gain. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17cooker: Allow profiling of the parser in profile modeRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17cooker: Avoid duplication for taskdata creationAlexandru DAMIAN
Clean-up to avoid duplication and promote code reuse to factor taskdata creation into a common function. [RP: minor tweaks] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-16runqueue: add runQueueTaskSkipped eventAlexandru DAMIAN
Adding a runQueueTaskSkipped to notify that the tasks that are not run either because they are set-scened or they don't need an update (timestamp was ok). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-16build: Add logfile to add TaskBase eventsRichard Purdie
We add the path to the logfile for all Task events except TaskInvalid so that we can trace back the logfile locations at some future point. TaskInvalid doesn't ever have a logfile. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-13cooker: updateCache should rause exceptions, not sys.exitRichard Purdie
Exiting from the server is antisocial, instead we should raise an exception. This will correctly fail the current command and reset the server state. We use the handled exception since for these conditions to occur, something was already displayed to the user. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-13knotty: Cleanup error/interruption handlingRichard Purdie
Only display a CommandFailed ERROR: message if there is an error to display. Only display an errors summary if we actually displayed errors. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-13command: Treat empty messages as failures, not CommandCompletedRichard Purdie
Empty messages should trigger CommandFailed, not CommandCompleted as otherwise the exit code will be incorrect. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-13cooker/command: Add finishcommand to reset cooker stateRichard Purdie
After running a command on the server, it needs to reset to the initial state. This ensures that subsequent clients start from a known state and notice any configuration changes. Ultimately we may want to do more than this buts a good start and better than nothing. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-13cooker: Rename confusing 'stop' state to 'forceshutdown'Richard Purdie
The shutdown state causes the server to finish what its doing, stop was them meant to completely stop it. It doesn't mean the server is stopped though. Renaming the current stop event for forceshutdown gives more meaning to what it actually does. The stopped namespace then becomes available to indicate a completely stopped server. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-13cooker: Clean up init/reset configuration codeRichard Purdie
Currently the cooker event data isn't rebuilt upon reset and the cache configuration cannot be changed after init. These are both bad things and this patch refactors the init/reset code so that it is possible to reconfigure the server. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-13cooker: Drop obsolete worker testRichard Purdie
This call only ever happens in cooker context now so we can drop the nasty worker check from here. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-13bitbake: xmlrpc: delete unused code BitBakeUIEventServerAlexandru DAMIAN
BitBakeUIEventServer is an unused class that pushes UI events over a separate thread. The current version of XMLRPC server works just fine with the classic UI event handlers, so this class is not needed. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-12data_smart: Account for changes in append/prepend/remove in the config hashRichard Purdie
bitbake wasn't reparsing when _remove items were added to its configuration and equally, appends/prepends were also being badly tracked. This change enrures these variables are accounted for in the configuration hash. [YOCTO #5172] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>