summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/command.py
Commit message (Collapse)AuthorAgeFilesLines
* ConfHandler.py: Add a hook for config parsingRichard Purdie2012-04-131-0/+7
| | | | | | | | | | | To make the UI settings take effect, we need to hook at the end of each config file parsing and set UI specific values. (Bitbake rev: f54e733c7863110896f43900d9e4e791602f9d65) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* command.py: Move triggerEvent to command async classDongxiao Xu2012-03-291-7/+10
| | | | | | | | | | | The parameters in triggerEvent function is an event object, and it may cost some time to pass this object through pipe, causing the pipe's poll() function timeout. Change it to async mode. (Bitbake rev: 3b5909ebc86a12dedfb30e5446aa81eb58921760) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* command.py: remove the resolve parameter in generateTargetsTreeDongxiao Xu2012-03-011-12/+2
| | | | | | | | | | Remove the "resolve" parameter since the original resolve=False option is no longer be used. (Bitbake rev: dadce609149cfb09ecdc53bfe1f416a3f57a5033) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* command.py: add resolve option for generateTargetsTree APIDongxiao Xu2012-02-231-2/+9
| | | | | | | | | | | | | | | Currently we have generateTargetsTree API, which is used to get dependency information. However in that tree, there will be "virtual/xxx" in depends fields. Therefore we add the resolve option to replace it with its real providers. Besides, for packages that provided by multiple recipes, we will find their preverred provider. (Bitbake rev: 28501612efdfc6ee47576cc90deb6e897883e7f5) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* command.py: Add a new API triggerEvent()Dongxiao Xu2012-02-231-0/+6
| | | | | | | | | | This functions enables the client to request triggering specific event from bitbake server. (Bitbake rev: 45da6d709a69697158fae92e1c0c0a6ac8f30831) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* command.py: add new API to get the cpu count on the serverShane Wang2012-02-231-0/+6
| | | | | | | | | Add a new API in command.py to get the cpu count in order to set the appropriate default BB_NUMBER_THREADS and PARALLEL_MAKE variables. (Bitbake rev: 335047b2e440e65713e88fabb24b47a9c82f939b) Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Add BBHandledException exception classRichard Purdie2012-01-101-2/+5
| | | | | | | | | | | | | | | | | | | | | | | We have a problem knowing when to show the user debug information and when not to since the code has already shown the user suitable information about why a failure is occurring. This patch adds a bb.BBHandledException exception class which can be used to identify those exceptions which don't need further explanation to the user. This patch uses this class for the bb.providers exceptions and ensures the command handling code correctly filters the exceptions meaning that "bitbake invalid" now shows an simple error message and not a python traceback. [YOCTO #1141 partial] (Bitbake rev: eac9249b40ae1e3aa21e016010c862664e59a8d4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* command.py: add parseConfigurationFiles APIDongxiao Xu2012-01-061-0/+10
| | | | | | | | | | The parseConfigurationFiles API calls the related function in cooker.py to parse config files. (Bitbake rev: 96c307b9874131ad8c7d9caea6f6dfbd09aab9d4) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker: remove command import in cooker.pyDongxiao Xu2012-01-061-0/+11
| | | | | | | | | | | | | There is no direct use of command in cooker.py, and it is using bb.command instead. Remove command in the import list. This fixes a problem of embedded import between command.py and cooker.py. (Bitbake rev: c353316b2efcc7a893d6b4aa9a9647d51a6f69e3) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* command.py: add initCooker APIDongxiao Xu2012-01-061-0/+6
| | | | | | | | | | initCooker is to set the cooker to the initial state with nothing parsed. (Bitbake rev: 8ee9c6cc47938604268242d90bd3007218f9a36e) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* command.py: Modify needcache value for certain functionsDongxiao Xu2012-01-061-2/+2
| | | | | | | | | | | for findConfigFiels() and findFilesMatchingInDir() functions, they don't need to parse all the bb files, thus setting the needcache value to be False. (Bitbake rev: 3ef73dee8b08ccfd15a4901cce315a99b22e71d7) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Remove the async_cmds and sync_cmds from command.pyRobert Yang2011-12-051-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In bitbake/lib/bb/command.py::Command::__init__, we have the following lines: for attr in CommandsSync.__dict__: command = attr[:].lower() method = getattr(CommandsSync, attr) sync_cmds[command] = (method) for attr in CommandsAsync.__dict__: command = attr[:].lower() method = getattr(CommandsAsync, attr) async_cmds[command] = (method) The sync_cmds and async_cmds are defined as global dictionaries, but it seems that we've never used them (I did a "grep -r async_cmds bitbake/", , there is no result except the ones that I have removed), and I can't find the history of it from "git log -p", I guess that they have been replaced by the self.cmds_sync and self.cmds_async. [YOCTO #1791] (Bitbake rev: 24e99460800856035bb54a84c7aa33b3517436e9) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Update users of getVar/setVar to use the data store functions directlyRichard Purdie2011-11-271-3/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/command|cooker: refactor the reparseFiles logicJoshua Lock2011-08-121-0/+7
| | | | | | | | | | | | | | | | | | | | Turn the reparseFiles logic into a command to reset the cooker's state machine and a noop which triggers a cache rebuild. The resetCooker command resets the cookers state machine such that a cache update will be triggered by any async command which requires the cache. The reparseFiles command remains as a noop async command that has the needcache property set to True so that when called it ensures the cache is built. Patch from Richard with the addition of removing the force parameter from the updateCache method. CC: Richard Purdie <richard.purdie@linuxfoundation.org> (Bitbake rev: a98f698fe9f38310024013e58475e6d1447ee154) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* command|cooker: Add reparseFiles commandJoshua Lock2011-07-261-0/+8
| | | | | | | | | | | Add command reparseFiles to reparse bb files in a running cooker instance. Fixes [YOCTO #1249] (Bitbake rev: de035ad99feb7644f99ad54804bf9f98cc776877) 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/+12
| | | | | | | | | | | | | | 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/+10
| | | | | | | | | 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>
* command|cooker: allow generating targets tree for specified pkgsJoshua Lock2011-07-011-2/+10
| | | | | | | | | | | 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>
* bitbake: Cleanup bitbake server init process to be clearer to followRichard Purdie2011-06-081-1/+1
| | | | | | | | 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>
* bitbake: implement command to find configuration files for a config variableJoshua Lock2011-02-241-0/+11
| | | | | | | | | 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/+10
| | | | | | | | | | 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>
* Rename command events, adjust compareRevisionsChris Larson2011-01-041-34/+24
| | | | | | | | | | | | - Moved the logic for comparing revisions from cooker into command - Removed 'Cooker' from the event names - Renamed the 'ExitCode' event into CommandExit, and changed CommandFailed to be a subclass of CommandExit (Bitbake rev: c51ed5d7a9971fad6019dac6c35a71b8a54ab16a) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: add shutdown/stop methodsChris Larson2011-01-041-2/+2
| | | | | | | (Bitbake rev: fc64eff03fe1f41e59128cb3df0ef2161e24a8cb) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: merge cookerState and cookerActionChris Larson2011-01-041-3/+4
| | | | | | | (Bitbake rev: c7c8945ef7ca9465312e630b7fa5f0a87ac8b6c7) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Add missing 'return False' to the SystemExit handler in runAsyncCommandChris Larson2010-07-021-0/+1
| | | | | | | (Bitbake rev: 966490c555cbdc09f52e1dcc68d3772c28ad9cee) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Handle SystemExit and KeyboardInterrupt sanely when executing a commandChris Larson2010-07-021-1/+10
| | | | | | | (Bitbake rev: 17f40d036814e4abf6d87363fff7823c8c85c298) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Formatting cleanupsChris Larson2010-07-021-5/+2
| | | | | | | (Bitbake rev: 2caf134b43a44dad30af4fbe33033b3c58deee57) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bb/command was importing bb and accessing some of its own classes indirectly ↵Chris Larson2010-03-251-3/+5
| | | | | | | | | as bb.command.<class> (Bitbake rev: 4b2a268ce8dad63d21619c1b9acc1de86d222d93) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Switch to bitbake-dev version (bitbake master upstream)Richard Purdie2010-01-201-0/+271
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>