summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
Commit message (Collapse)AuthorAgeFilesLines
* cooker: only return *Found events if something was actually foundJoshua Lock2011-07-141-4/+8
| | | | | | | | | | | | | The cooker methods which fire FooBarFound style events should only fire the event when an item was actually found, rather than each time the method is called. Fixes [YOCTO #1219] (Bitbake rev: 5c8eeefc79455f058dda8f04cf4c12dc5418e00f) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake cooker/ui: handle cmd line parsing result by individual UI.Lianhao Lu2011-07-081-18/+16
| | | | | | | | | | | Changed the return result of "getCmdLineAction" to a dictionary {'action', 'msg'} to allow the individual UI decide how to handle the cmd line parsing result. (Bitbake rev: 521909d1350a415d19516aa1710041e30950c7cc) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cache.py: Ensure additional .bbappend files are accounted forRichard Purdie2011-07-071-1/+1
| | | | | | | | | | | | Currently if a user adds a new .bbappend file to the system, the cache still thinks the cached data is valid. This code fixes that to ensure additions and changed in append application order are accounted for. [YOCTO #1091] (Bitbake rev: 54fe91fe96aaae47c40077c5f441c79da71da777) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/cooker, bitbake-layers: show the .bbappend files that matches no ↵Dexuan Cui2011-07-051-0/+22
| | | | | | | | | | | | | | existing .bb recipe This patch moves the logic of show_appends_with_no_recipes from bitbake-layers into bitbake. By default, a fatal message is printed; we can also define a variable BB_DANGLINGAPPENDS_WARNONLY to make the message only a warning(the variables could be defined in conf/local.conf with a value "yes", "true" or "1"). (Bitbake rev: f5ba7c795df7cbd58124e35970ddc5bd84cbfb8e) Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/cooker: implement layer dependencies, make priority optionalPaul Eggleton2011-07-051-9/+70
| | | | | | | | | | | | | | | | | | | | | | | Implement (optionally versioned) dependencies between layers, and if layer priorities are not specified using BBFILE_PRIORITY_layername (now optional) then work out the layer priority based on dependencies. Define LAYERDEPENDS_layername in layer.conf to specify the dependencies of a layer (list of layer names, split with spaces in the usual way); LAYERVERSION_layername can be defined for each layer allowing specific version dependencies to be specified via depname:version in the list of dependencies. An error will be produced if any dependency is missing or the version numbers do not match exactly (if specified). Note: default priority if unspecified for a layer with no dependencies is lowest defined priority + 1 (or 1 if no priorities are defined). Addresses [YOCTO #790]. (Bitbake rev: 115b89fa279b64e79da0f72caf7b30965a83fab1) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: track 'overlayed' recipesPaul Eggleton2011-07-051-0/+13
| | | | | | | | | | | | Recipes that have been 'overlayed' (where there is a recipe in another layer where that layer has a higher priority) are now listed within cooker.overlayedlist for use in bitbake-layers. This is a dict with keys of the topmost (highest priority) recipe file. (Bitbake rev: 370fc603d79f9c34cc23b4b520b685256c23df5d) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: add -R option for loading configuration files after bitbake.confJoshua Lock2011-07-011-3/+10
| | | | | | | | | | Useful if you want to load a configuration file that sets values which may also be set in bitbake.conf or one of the files it includes. (Bitbake rev: a8246ae5400c23df0d3ee29c36f4d9f257d1e6d1) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker: switch to new universe target rather than worldJoshua Lock2011-07-011-2/+2
| | | | | | | | | | When the caller doesn't specify a pkgs list we want to generate the tree of all available packages. To do so use the new universe target list. (Bitbake rev: 26b0c538ad4f677e0d45a66484c2dca073459282) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker: remove code duplication in non trivial functionsJoshua Lock2011-07-011-44/+12
| | | | | | | | | | | | | | The generateTargetsTreeData() and generateDepTreeData() functions perform are essentially the same function only creating slightly different data structures. Instead of duplicating non-trivial code drop generateTargetsTreeData and instead have an optional boolean argument which defaults to False for generateDepTreeData() which has it include the extra fields required for the targets tree. (Bitbake rev: 3e38ea4e5748473740821b6e10c8477c08ab45e2) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker|command|event: add new command findFilesMatchingInDirJoshua Lock2011-07-011-0/+23
| | | | | | | | | | | | | | This command can be used to search each BBPATH for files in the passed directory which have a filename matching the supplied pattern. This is implemented for use from the GUI (to determine the available PACKAGE_CLASSES) but has been written so as to be generically useful and reusable. (Bitbake rev: 2a599812a57cb0b964880a6a2b7548423497ea92) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* command|cooker|event: add findConfigFilePath commandJoshua Lock2011-07-011-0/+4
| | | | | | | | | This takes the name of a .conf file and returns the full path to it (Bitbake rev: 22c8600b885faf841795b872d82f68dfb644a26e) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker: add generic method to locate configuration filesJoshua Lock2011-07-011-4/+7
| | | | | | | | | | Convert _findLayerConf(self) to _findConfigFile(self, configfile) so that the core functionality of the method can be used elsewhere. (Bitbake rev: c515b76c3a27d57d5ae8dddf15cc836811b24ee1) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* command|cooker: allow generating targets tree for specified pkgsJoshua Lock2011-07-011-2/+4
| | | | | | | | | | | Modify the generateTargetsTree command to allow a list of packages to be supplied by the caller, in this case we will only generate a target tree for user requested targets rather than building a tree for the world list. (Bitbake rev: d4e4f2ecae96e074b2ab3bb9882037af2e385fdd) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* make exception handling syntax consistentScott Garman2011-06-151-5/+5
| | | | | | | | | | Update exception handling syntax to use the modern style: except ExcType as localvar (Bitbake rev: dbf5f42b06bef81749b13aa99945cc1292a6676d) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/cooker: Fix -b option by ensuring the empty cache structure is presentRichard Purdie2011-06-131-0/+3
| | | | | | (Bitbake rev: 1430a36e81737bd92245042710eb9d6ad8b6f1a7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* track skipped packagesPaul Eggleton2011-06-091-0/+16
| | | | | | | | | | | | | Add skiplist to cooker that allows access to the list of packages skipped via SkipPackage (this includes COMPATIBLE_MACHINE, INCOMPATIBLE_LICENSE, etc.) This can be used to enhance error reporting. (From Poky rev: 6c12b7b1099c77b87d4431d55e949cf7c5f52ded) (Bitbake rev: 7d2363f35350be27a33f568c23eb07fcd3d27e53) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Drop psyco supportRichard Purdie2011-06-091-13/+0
| | | | | | | | | | | At best it gave 1-2% improvement now, its 32 bit x86 only and isn't supported after python 2.6. PyPy is probably a better option now. (Bitbake rev: 3c3bd0c2fa80d747f25401c17b785c7c2f3787ca) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/cooker.py: Misc sync with upstreamRichard Purdie2011-06-081-13/+16
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker: use BBHandler.inherit for INHERITChris Larson2011-06-081-10/+24
| | | | | | | | | | | | | | | | | Ideally we'd avoid direct BBHandler usage, but honestly, to say the whole bb.parse abstraction is incredibly leaky is an understatement. If we try to make handle() not reparse classes, things get ugly fairly quickly, as inherit() calls handle() itself after adding the class to the inherit cache. This change fixes it so we no longer risk reparsing a class if: - it's listed in INHERIT multiple times - it's listed in INHERIT and is 'inherit'ed from a class in INHERIT (Bitbake rev: 057c3cddeb72584c6c3908bd702288cece9b66ea) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker: simplify self.configuration.data vs data usageChris Larson2011-06-081-10/+9
| | | | | | | (Bitbake rev: 87112adee4e8add0a97ff8be8311d9afe202412d) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker: don't choke if we have nothing to parseChris Larson2011-06-081-5/+11
| | | | | | | | | | If all our recipes were cached, there's no reason to fire off any parsing progress events at all. (Bitbake rev: e9e174e5781fc3de4dfd60d01228048a06a62b16) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker: handle ExpansionError the same way we do ParseErrorChris Larson2011-06-081-1/+1
| | | | | | | (Bitbake rev: 12aef37618bc77fb5ef085d24ad85471fb85c111) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Shift exception formatting into the UIChris Larson2011-06-081-6/+4
| | | | | | | | | | | | | Now we use bb.exceptions to pass pickleable traceback entries to the UI, and the UI is free to do whatever it wants to do with this information. By default, the log formatter for the UIs formats it with bb.exceptions. This also means that all exceptions should now show 3 lines of context and limit to 5 entries. (Bitbake rev: ee48d628ee038bd72e1cd94aa75f5ccbacbcee4c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker: don't show a traceback for ParseErrorChris Larson2011-06-081-0/+2
| | | | | | | (Bitbake rev: cae6bf031dc83ba0439d07584fdbbd4a962408a3) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker: don't show a useless traceback for SyntaxErrorChris Larson2011-06-081-1/+4
| | | | | | | | | | Note: we rely on the fact that better_compile has already output information about the exception, so don't do it ourselves. (Bitbake rev: caf21e9fbf3c526c1d7c555d8c76dca8710f9def) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker: use logger.exception for config file parse errorsChris Larson2011-06-081-1/+7
| | | | | | | (Bitbake rev: 775590c154bc189df3f5704bddf9b684b734fde0) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker: pass traceback back from parsing threadChris Larson2011-06-081-2/+9
| | | | | | | | | | | Uses bb.exceptions to get a traceback back from the parsing thread to the main thread, where it is then formatted. Also enables 3 lines of context for the formatted traceback, and limits the number of entries displayed to 5. (Bitbake rev: 8c33f50eb68411c071c001331e0134aeb776953b) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker: show a useful message for ParsingFailureChris Larson2011-06-081-3/+6
| | | | | | | (Bitbake rev: a41c217c6e9195f8b9ea2de6e1d335b10b904558) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/cooker.py: Fix debug message argumentsRichard Purdie2011-06-081-1/+1
| | | | | | | | (From Poky rev: 06bb59d) (Bitbake rev: b420e865f6dfb04b58c1dbc5f1b5332b137f49ff) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Cleanup bitbake server init process to be clearer to followRichard Purdie2011-06-081-6/+5
| | | | | | | | Create a standard format server class instance with method calls for each step in the server setup. There should be enough hooks for each of the different server types. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cache: Implement multiple extra cache fields request supportLiping Ke2011-06-071-8/+8
| | | | | | | | | | | | | | This patch is to support extra cache. If user needs to request extra cache fields besides CoreRecipeInfo fields, just add a new XXXRecipeInfo class definition as Hob Does. Currently supported Extra RecipeInfo name is an array. We can support multiple extra cache fields at the same time besides CoreRecipeInfo which is needed by all clients. (Bitbake rev: 077657e50ad032c0fa876bf54e9802af2686e0fb) Signed-off-by: Liping Ke <liping.ke@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Introduce new param caches_array into Cache impl.Liping Ke2011-06-071-8/+44
| | | | | | | | | | | | | | When using hob ui interface, we need extra cache fields. We will save ui required extra cache fields into a separate cache file. This patch introduce this caches_array parameter. It will be used in the extra cache implementation (following patch). Caches_array at least contains CoreRecipeInfo. If users need extra cache fields support, such as 'hob', caches_array will contain more relevant elements such as HobRecipeInfo. (Bitbake rev: d50389ae692377c957afec7c846fc2ce2c070a09) Signed-off-by: Liping Ke <liping.ke@intel.com>
* bitbake: use layer priority when applying bbappendsPaul Eggleton2011-06-011-10/+14
| | | | | | | | | | | | | If the priority of a layer has been specified with BBFILE_PRIORITY_ then use that to sort the list of BBFILES entries, which will affect the order in which .bbappend files are applied. Fixes [YOCTO #1125] (Bitbake rev: a8ab0af776ba20c83832215054180fbd15c274c0) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/codeparser: Improve cache handlingRichard Purdie2011-05-271-0/+1
| | | | | | | | | | | | | | | | | | | The current codeparser cache handling hurts performance badly even over a couple of cores and certainly on many core systems, it can spent huge amounts of time in the codeparser cache save functions. This patch reworks the cache handling so that each parsing thread saves out its own "differences" file compared to any existing core cache and then the main bitbake thread picks these up and merges things back together. This was tested on systems with small and large numbers of cores and was found to perform orders of magnitude better in all cases despite the more complex code. (Bitbake rev: 9f27563d66523f5af1028f173d53ee75e0877d46) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/cooker.py: Ensure BBFILES is processed in orderRichard Purdie2011-05-271-3/+8
| | | | | | | | | | | | | | | The files found by collect_bbfiles should be processed in order but due to being processed using python's set(), the order was not being preserved. Use a list instead as whilst the code is slightly more ugly, order is preserved. Addresses [YOCTO #1100] Acked-by: Darren Hart <dvhart@linux.intel.com> (Bitbake rev: c12dd868368bdc3a4f800e075a30c67edca28d47) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/cooker.py: Fix -b option regexp handlingRichard Purdie2011-05-271-7/+6
| | | | | | | | | | | bitbake -b core-image was showing no matches when it should list all targets containing the fragment "core-image". This patch only calls os.path.abspath() on things that look like paths and passed the path around more consistently to various functions to get this use case working again. (Bitbake rev: 6e9119c42d3f4cb3dab3d25856eee8b4bf4ad94f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker.py: Don't show spurious warnings for collections of .bbappend filesRichard Purdie2011-05-251-1/+18
| | | | | | | | | | | | | | Seeing warnings like: WARNING: No bb files matched BBFILE_PATTERN_yocto '^/xxx/meta-yocto/' are not encouraging to users and we shouldn't show these if we found .bbappend files (but no .bb files). This change stops these warnings from appearing. (Bitbake rev: 48899fe7b3791dd897968f44c317e98bad14e146) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker: fix -b with BBCLASSEXTENDChris Larson2011-05-061-7/+10
| | | | | | | (Bitbake rev: 58bdaeb679d3c84cda827a33d09ce543547c45b4) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/cache.py: Ensure skipped recipes make it into the cache to avoid ↵Richard Purdie2011-05-051-2/+1
| | | | | | reparsing Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/cooker/codeparser: Ensure the code parser cache is saved for each ↵Richard Purdie2011-05-051-4/+1
| | | | | | | | | | | | | | parsing process Before this change, the codeparser cache was only being saved for the main server process. This is suboptimal as it leaves code being re-evaluated at task execution time and increases parse time. We use the multiprocess Finalize() functionality to ensure each process saves out its cache. We need to update the cache save function to be multiprocess friendly with locking. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* universe target: add a new target to collect all recipe targetsSaul Wold2011-05-031-0/+8
| | | | | | | | | This new universe target is not intended to be used for compiling or building everything, it use is for sanity checking and other tasks that need to find all targets. This does not exclude any broken or virtual targets. Signed-off-by: Saul Wold <sgw@linux.intel.com>
* bitbake/cooker: don't error in prepareTreeData for unbuildable targetsJoshua Lock2011-03-141-1/+3
| | | | | | | Set abort to False in prepareTreeData so that unbuildable targets do not raise an exception. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake/cooker: don't drop possible_world ref countJoshua Lock2011-02-241-4/+0
| | | | | | | | We need this if we want to run the buildWorldTargetList function more than once, for example in a UI where we can change the MACHINE and DISTRO as much as we like before triggering a build. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake/[cooker|cache]: cache summary, license and group. Add to targets treeJoshua Lock2011-02-241-0/+6
| | | | | | | | | Add summary, license and group metadata to RecipeInfo and the cache. Unfortunately this impacts parse speed but gives us a much richer set of metadata to expose through UI's which can be accessed via the generateTargetsTree command. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake/cooker: reduce code duplicationJoshua Lock2011-02-241-26/+11
| | | | | | | | Move runqueua and taskdata initialisation into a new function, prepareTreeData(), so that generateDepTreeData() and generateTargetsTreeData() are not duplicating the same logic. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake/cooker: add generateTargetsTree methodJoshua Lock2011-02-241-3/+64
| | | | | | | | | | The generateTargetsTree() command needs to return a model which includes more metadata than the one generated by generateDepTree(). This patch adds a new method generateTargetsTreeData() to the cooker, based on generateDepData(), and switches generateTargetsTree() to use it. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake: implement command to find configuration files for a config variableJoshua Lock2011-02-241-0/+24
| | | | | | | | | Some configuration variables (MACHINE, MACHINE-SDK and DISTRO) set which confguration files bitbake should use. The added command , findConfigFiles, enables a UI to query which files are suitable values for a specified parameter. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake: implement command to get all possible targets and their dependenciesJoshua Lock2011-02-241-0/+25
| | | | | | | | | | Add a new command generateTargetsTree() which returns a dependency tree of possible targets (tasks and recipes) as well as their dependency information. Optional parameter 'klass' also ensures any recipes which inherit the specified class path (i.e. 'classes/image.bbclass') are included in the model Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake/cooker: Fix parsing failure zombie problemRichard Purdie2011-02-231-0/+12
| | | | | | | | | When parsing if a SystemExit event is triggered, it causes the parsing thread to exit and the main process hangs waiting for it to finish indefintely. Add code to catch BaseExceptions and raise these with the main process gracefully instead of just hanging indefinitely with zombie processes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/cooker: Ensure delays are accurately transfered to the idle loops ↵Richard Purdie2011-02-151-2/+2
| | | | | | from runqueue Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>