summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/knotty.py
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: knotty: Ensure consolelog file handle is closedRichard Purdie2016-05-131-0/+5
| | | | | | | | | If we don't close the console log file handle, python prints a warning about unclosed file handles upon exit which is annoying. (Bitbake rev: 624dd92952b2fc736fd86abe5f2390b87b3a7dd3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Update logger.warn() -> logger.warning()Richard Purdie2016-05-111-4/+4
| | | | | | | | | | python deprecated logger.warn() in favour of logger.warning(). This is only used in bitbake code so we may as well just translate everything to avoid warnings under python 3. Its safe for python 2.7. (Bitbake rev: 676a5f592e8507e81b8f748d58acfea7572f8796) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: providers: Add PREFERRED_RPROVIDER supportRichard Purdie2016-04-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes you can end up in a situation where you need to specify that a specific runtime entity should be provided by a specific entry. An example of this is bluez where you could end up in a situation where for example: NOTE: multiple providers are available for runtime libasound-module-bluez (bluez4, bluez5) NOTE: consider defining a PREFERRED_PROVIDER entry to match libasound-module-bluez NOTE: multiple providers are available for runtime bluez-hcidump (bluez-hcidump, bluez5) NOTE: consider defining a PREFERRED_PROVIDER entry to match bluez-hcidump The only option here is to set something like PREFERRED_PROVIDER_bluez4 = "bluez4" which is clearly not very informative. I've actually held off adding RPROVIDER support for a long while as this does have sigificant potential for misuse. It doesn't for example allow multiple runtime providers of the same name to coexist, that simply isn't supported. It therefore doesn't replace some of the name mappings such as busybox verses coreutils that OE-Core faces as that is a different problem with different constraints. This mechanism is simply to provide bitbake with a hint to decide what the dependency tree should look like. Also, this allows us to stop printing a confusing message telling the user to set PREFERRED_PROVIDER when the setting needed would be rather ambiguous. [YOCTO #5044] (Bitbake rev: 62eb39d1474d024b204634689071700605c6095c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker/knotty: Prefix parse logs with filename being parsedRichard Purdie2016-04-151-1/+2
| | | | | | | | | | | | | We now prefix log messages coming from worker task context with the PF and task info, however parsing messages all have to be manually prefixed which is ugly and error prone. This change modifies the log handler filter so this happens automatically, meaning we don't have to change every message to include that information. This makes error messages longer but more usable. (Bitbake rev: 1af0ccaac81e182c4ca520037dda362d180e5605) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb.ui.knotty: prefix task messages with recipe/taskChristopher Larson2016-02-161-5/+13
| | | | | | | | | An example prefix: `perl-5.22.1-r0 do_compile:` (Bitbake rev: 792b759e59e31d2e43d525a6e50d866b4f51f072) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Set exit failure code on runQueueTaskFailed eventsRichard Purdie2016-02-151-0/+1
| | | | | | | | | | | If the worker segfaults, we may never see a TaskFailed event from it, only a runQueueTaskFailed event. In this case, return_value isn't getting set leading to an incorrect exit code from bitbake. Fix by setting return_value in both places. (Bitbake rev: e5dd50e0d95d532fe31dde61f8c6b1a7a72321e9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Don't show errors for universe provider issuesRichard Purdie2016-02-011-5/+13
| | | | | | | | | | | | When running universe builds, we don't expect an error exit code for provider warnings. Change the error messages to warnings in this case. This deals with errors causing problems on our autobuilders amongst other issues. (Bitbake rev: d4989fb0355476de172169f0698757f7360e9a1f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Set process names to be meaninfulRichard Purdie2016-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This means that when you view the process tree, the processes have meaningful names, aiding debugging: $ pstree -p 30021 bash(30021)───KnottyUI(115579)───Cooker(115590)─┬─PRServ(115592)───{PRServ Handler}(115593) ├─Worker(115630)───bash:sleep(115631)───run.do_sleep.11(115633)───sleep(115634) └─{ProcessEQueue}(115591) $ pstree -p 30021 bash(30021)───KnottyUI(117319)───Cooker(117330)─┬─Cooker(117335) ├─PRServ(117332)───{PRServ Handler}(117333) ├─Parser-1:2(117336) └─{ProcessEQueue}(117331) Applies to parse threads, PR Server, cooker, the workers and execution threads, working within the 16 character limit as best we can. Needed to tweak the bitbake-worker magic values to tell the workers apart. (Bitbake rev: 539726a3b2202249a3f148d99e08909cb61902a5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Use non-interactive mode as fallback for dumb terminalsRichard Purdie2016-01-081-0/+4
| | | | | | | | | | | | | | | TERM=dumb bitbake X shows no output for task status which is suboptimal. Use the non-interactive mode if the terminal doesn't support what we need for interactive mode giving a better user experience. Also print a note to the console to say this has happened. [YOCTO #8768] (Bitbake rev: 6f84cf4bd77f35fcd07e0b2f5149f1d6866a414d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Improve exception error messageRichard Purdie2015-12-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Instead of: """ can only concatenate tuple (not "int") to tuple """ we now see: """ Traceback (most recent call last): File "/media/build1/poky/bitbake/lib/bb/ui/knotty.py", line 324, in main termfilter.updateFooter() File "/media/build1/poky/bitbake/lib/bb/ui/knotty.py", line 210, in updateFooter lines = 1 + int(len(content) / (self.columns + 1)) TypeError: can only concatenate tuple (not "int") to tuple """ which makes tacking down and fixing the problem much easier. Also ensure we set an error exit code. (Bitbake rev: d965bcae6cfd268406a3bd1ef77c5bb6c6e1c6d7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Fix row/column function return value issueRichard Purdie2015-12-181-1/+1
| | | | | | | | | | | | | When the row handling was introduced, one of the callbacks was missed resulting in: TypeError: can only concatenate tuple (not "int") to tuple Fix it. (Bitbake rev: 0b77cea2bf5b5f5704e2650fb0332f5d78037781) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Enforce terminal line limit to stop crazy scrollingRichard Purdie2015-12-081-3/+4
| | | | | | | | | | | | | | | | If there are more tasks running than there are lines on the terminal, the data scrolls in ways the UI wasn't designed for. This patch adjusts the UI just to show the processes which fit onto the number of rows in the terminal window. You can see the total number running from the counter in the top left as usual and this makes warning and errors messages scrolling from the top of the window work as designed. Ultimately, scrolling would be nice but is for another time, this fixes the biggest UI issue on highly parallel machines. (Bitbake rev: 67b77658e2bfa849f6f55c9c262cb11d6bfdb399) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb/ui: Use getSetVariable command for BB_CONSOLELOGRichard Purdie2015-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | Metadata can define BB_CONSOLELOG as containing ${DATETIME} and this can get expanded to a different value each time the variable is read. In the case of BB_CONSOLELOG, this behaviour is not desireable. The values of DATE/TIME are locked down at build time but this is too late for the purposes of ensuring the system can figure out the real value of BB_CONSOLELOG. The best way to do this is to set the variable into the datastore, thereby preserving its value. [YOCTO #8411] (Bitbake rev: 021f2eb55ab5863b57ed1b3f19f1b329bc1ad477) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: properly fix bitbake.lock handlingRichard Purdie2015-08-011-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the PR server or indeed any other child process takes some time to exit (which it sometimes does when saving its database), it can end up holding bitbake.lock after the UI exits, which led to errors if you ran bitbake commands successively - we saw this when running the PR server oe-selftest tests in OE-Core. The recent attempt to fix this wasn't quite right and ended up breaking memory resident bitbake. This time we close the lock file when cooker shuts down (inside the UI process) instead of unlocking it, and this is done in the cooker code rather than the actual UI code so it doesn't matter which UI is in use. Additionally we report that we're waiting for the lock to be released, using lsof or fuser if available to list the processes with the lock open. The 'magic' in the locking is due to all spawned subprocesses of bitbake holding an open file descriptor to the bitbake.lock. It is automatically unlocked when all those fds close the file (as all the processes terminate). We close the UI copy of the lock explicitly, then close the server process copy, any remaining open copy is therefore some proess exiting. (The reproducer for the problem is to set PRSERV_HOST = "localhost:0" and add a call to time.sleep(20) after self.server_close() in lib/prserv/serv.py, then run "bitbake -p; bitbake -p" ). Cleanup work done by Paul Eggleton <paul.eggleton@linux.intel.com>. This reverts bitbake commit 69ecd15aece54753154950c55d7af42f85ad8606 and e97a9f1528d77503b5c93e48e3de9933fbb9f3cd. (Bitbake rev: a29780bd43f74b7326fe788dbd65177b86806fcf) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty.py: Make sure bitbake.lock is unlocked before exitingLeonardo Sandoval2015-07-091-0/+20
| | | | | | | | | | | | Before exiting the UI, unlocks the bitbake.lock owned by cooker; this way consecutive bitbake executions can lock it again without trouble. [Yocto #7941] (Bitbake rev: 69ecd15aece54753154950c55d7af42f85ad8606) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty.py: fix indentRobert Yang2015-03-191-19/+19
| | | | | | | | | It used 5 spaces as the indent. (Bitbake rev: 162d35ed53d34b28b153adf643044e7f105fcff1) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Do not log show_versions outputRob Woolley2015-03-161-1/+1
| | | | | | | | | | | | | Every time the bitbake show versions command (bitbake -s) is run it creates a 100k log file. The consolelogfile is disabled for show environment and disabling show versions would make the behaviour match. (Bitbake rev: dee0ba94e39ea49c1e9261a5e8932356e3bb7c57) Signed-off-by: Rob Woolley <rob.woolley@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Catch exceptions on broken pipesRob Woolley2015-03-161-19/+24
| | | | | | | | | | | | | | | | Any exceptions that occur in calls to logging methods are automatically suppressed, including exceptions due to broken pipes. However, the knotty summary messages are printed directly to stdout, which means that any broken pipes will cause an exception traceback in python. By wrapping the summary section in a try / catch block we can check for IOError exceptions caused by broken pipes and let them pass. (Bitbake rev: 146e7e157f97b676858ecff583dd53800d997253) Signed-off-by: Rob Woolley <rob.woolley@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: command/cooker/knotty: Fix memres handling of command environment ↵Richard Purdie2015-01-211-1/+1
| | | | | | | | | | | | | | | | changes If the environment changes, we need memory resident bitbake to adapt to those changes. This adds in functionality to handle this alongside the configuration option handling code. This means that the common usage: MACHINE=X bitbake Y now works with the memory resident server. (Bitbake rev: 4d1343010da757a0c126bc22475354da44aaf8e3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Ensure commandline parameters are updated in memres serverRichard Purdie2014-09-231-0/+1
| | | | | | | | | | | | | | | | When using options like -k, -f, -v and so on with the memory resident server, they'd currently only be set on the initial values passed to the original command. This ensures they now match those specified on the commandline for the options where this makes sense. To make this work, a command to update the options on the server side is required so this is added. [YOCTO #5292] (Bitbake rev: 1c75cc4d0c8b606c1fe76e6bf60bf6a32298b105) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: ignore interrupted system callsDan McGregor2014-09-011-1/+1
| | | | | | | | | | | | | With the improved exception handling added in an earlier commit bitbake now stops when recieving a SIGWINCH. This happens frequently when disconnecting and reconnecting tmux sessions and bitbake didn't survive. Restore old behaviour of ignoring interrupted system calls but keep proper exception handling for other errors. (Bitbake rev: 418358a595c75f45b8d15160ec42bbe569562d91) Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Improve exception handlingRichard Purdie2014-08-231-1/+9
| | | | | | | | | | | | 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. (Bitbake rev: 9544108f7b413038d871ce6ca88232de2f2434d9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Move second event check into a proper blockNamhyung Kim2014-08-021-2/+2
| | | | | | | | | so that it doesn't check it twice for non-empty events (Bitbake rev: e304ace6d8f7d0808ee401b7c01146b2798a81b4) Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Fix output printed to the user at debug log levelsRichard Purdie2014-05-111-1/+1
| | | | | | | | | | | | | | | | | | If a user runs with the -v or -D options, its understandable they'd expect to see log output from the workers yet right now a bug in the log handling does not show this. Fix the conditional to ensure such log output is shown on the terminal when it has been requested. Ideally this data should always flow to the logfiles but that is for another patch. This also fixes the code to do what was always intended in the comments, i.e. if the user specifies -D or -v, output is shown from the tasks, otherwise notes are suppressed. (Bitbake rev: 20a3c93d8572969e76563f29bff89400b93ffae7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: knotty: Clear footer before outputting to stderrPeter Kjellerstedt2014-04-081-2/+3
| | | | | | | | | | | | | With the recent change to split the log output to stdout and stderr, error messages that appeared while the footer was printed got all messed up. This was because the messages to stderr was output _after_ the footer, then clearFooter() tried to remove the footer but removed the error message and parts of the footer. (Bitbake rev: 4fafea4fa69542b491e84463f6eae0d5bf645673) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Show a link to the logfile for failed setscene tasksRichard Purdie2014-03-271-0/+3
| | | | | | | | | | | Its not immediately obvious to the user that a logfile exists for a failed setscene task. Add code to knotty to display where that logfile is in those cases. [YOCTO #6055] (Bitbake rev: 0664fa15597785dd90cf205531a9801e6da6ba47) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Split error output onto stderrRichard Purdie2014-03-271-1/+5
| | | | | | | | | | | | When using bitbake -e in scripts, it would be helpful if the error output appeared on stderr, not stdout. This change enables that building upon the new bb.msg filters. [YOCTO #5274] (Bitbake rev: ebb797fc5c37d729e3cc8b2dc7156287d385c13b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Ensure the progress bar shows on stdoutRichard Purdie2014-03-271-1/+1
| | | | | | | | | | | | I can understand why some programs would want the progress on stderr so that real output can be captured on stdout. This is confusing for bitbake since we don't show a progress bar at all in non-interactive cases. Therefore make sure the progress bar goes to stdout, not the stderr default. (Bitbake rev: 0529aa9966df5c56b07affe865efce18852efe5a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker/event: Overhaul sanity test mechanismRichard Purdie2014-03-271-0/+2
| | | | | | | | | | | | | | | | | | Sanity tests are currently a pain as its hard to control when they run. This results in issues where for example the bitbake -e output is not useful as the sanity tests prevent it from executing. The sanity tests should run later than the base configuration. This patch changes the sanity tests to always be event triggered with the option of returning either events on the status, or raising errors. A new cooker feature is used to change the behaviour depending on the controlling UI. This does need a change to sanity.bbclass in the OE metadata but its worth the pain for the increased flexibility and control this offers UIs and the improvement to the user experience. (Bitbake rev: 32e171bcc92c6e27fefee971e8714ddf8e1a8ac1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Remove latency when exitingRichard Purdie2014-03-101-2/+2
| | | | | | | | | | There is no point in waiting 0.25s for when we should be processing the shutdown. This simply reordering removes latency from the bitbake command. (Bitbake rev: f147b41bcaf9d05b5ba3a70100f1ca799979aee7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Add missing continue statement for runQueueExitWait eventRichard Purdie2014-03-101-2/+1
| | | | | | | | | The continue statement was missing for this event and the event was then listed in the "known safe to ignore list". Clean this up. (Bitbake rev: c4ee342300bf905e6e3bef581c61b86289461536) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Deal with exceptions not resetting terminal configurationRichard Purdie2014-03-101-2/+2
| | | | | | | | | | | When an exception occurred, the terminal parameters (such as echo) may not be reset correctly. This change ensures they do get atexit time in all cases, avoiding the terminal corruption issues that could sometimes occur. (Bitbake rev: e1d89166f2dfe46412ff9a5610dd57b0cef74fe3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: event: adding generic event for metadata usageAlexandru DAMIAN2013-09-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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. (Bitbake rev: ae1ea51aaab73e010d1c3db39df058bebebc11dd) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: cooker,xmlrpc,servers: implement CookerFeaturesAlexandru DAMIAN2013-09-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (Bitbake rev: 98e594837aab89ea042cfa9f3740d20a661b14e2) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Cleanup error/interruption handlingRichard Purdie2013-09-141-3/+4
| | | | | | | | | | Only display a CommandFailed ERROR: message if there is an error to display. Only display an errors summary if we actually displayed errors. (Bitbake rev: 568ea00acd226d48e725bb01d4f8c410ed1eaa61) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: Rename confusing 'stop' state to 'forceshutdown'Richard Purdie2013-09-141-1/+1
| | | | | | | | | | | | 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. (Bitbake rev: 12e9d33bfae5294e3870dfd1202f63383ad05e92) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Reduce refresh of footerRichard Purdie2013-09-061-2/+4
| | | | | | | | | | | When displaying larger number of events the client can get caught up in displaying the footer, then immediately overwriting it. To avoid this, wait for pauses in the event stream before displaying the footer to give a slightly more friendly feel to the UI. (Bitbake rev: 5d706c7cd6ee8d83b67ff18312d4c8119bea8878) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Add ui event handlers filteringRichard Purdie2013-08-261-0/+12
| | | | | | | | | | | | | | | | | | | Add functionality to allow UIs to update and change the types of events they recieve. To do this we need to add a new command and also need to be able to obtain the current event hander ID. In the case of xmlrpc, this is straightforward, in the case of the process server we need to save the result in a multiprocessing.Value() so we can retrive it. An excplit command was added to the server API to facilitate this. The same function can also be used to mask or unmask specific log messages, allowing the UI to optionally differ from the standard set of message filtering. Based upon work by Cristiana Voicu <cristiana.voicu@intel.com> (Bitbake rev: ba5a6c88785d9889d4172ec79937ac2a5555327e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: taskdata: report close matches with NoProvider errorsPaul Eggleton2013-08-161-2/+7
| | | | | | | | | | | Assuming there is no known reason why an item is not provided, show close matches on the assumption that it might have been a typo or other mistake. (Bitbake rev: ed81b0856b4a3892b53d39871eaaa6273390ea75) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty, bitbake: add option to terminate a remote serverAlexandru DAMIAN2013-06-171-0/+4
| | | | | | | | | | I add an option to terminate a remote server gracefully as not to need a kill command. (Bitbake rev: 7495f835666a9561c2c7d84da7aaa74e4df55b9a) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty, xmlrpc: add observer-only modeAlexandru DAMIAN2013-06-171-12/+17
| | | | | | | | | | | | | | | | | | | | | 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. (Bitbake rev: 4de9ee21f1fa4d04937cc7430fb1fc8b7a8f61e2) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: Move commandline parsing back into the UI/cookerdataRichard Purdie2013-05-221-8/+11
| | | | | | | | | | | | | | | | | | | | | 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. (Bitbake rev: 2dbbb1d51dafd4451fef8fe16f095bcd4b8f1177) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib: print is a function in moderm python, covert remaining usersRichard Purdie2013-05-091-3/+3
| | | | | | (Bitbake rev: d0b180d868390a464b6799ad90db6bbe0350e158) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty.py: fix unknown event bb.event.DiskFullRobert Yang2013-02-151-1/+2
| | | | | | | | | | | | | | | | | | | | There is an error: ERROR: No new tasks can be excuted since the disk space monitor action is "STOPTASKS"! ERROR: Unknown event: <bb.event.DiskFull object at 0x2ab6310> This is because we don't handle the event bb.event.DiskFull in knotty.py, we don't want the knotty to do anything here since we have done everything in monitordisk.py, so just ignore this event would fix the problem. [YOCTO #3523] (Bitbake rev: 0fa874dbe0532bbe88ade405f514a237e6cd2488) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: use bb.error instead of printMihai Lindner2012-12-141-2/+2
| | | | | | | | | | Change to use bb.error instead of print, or maybe that was desired (?) Also remove a tab, while in the neighborhood. (Bitbake rev: 4a36a1af71530afc8fa896271fa94362ead176bd) Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty/msg: Avoid usage of curses initscr/endwin to avoid terminal ↵Richard Purdie2012-11-251-4/+4
| | | | | | | | | | | | corruption Using curses initscr/endwin causes screen corruption if for example you suspend bitbake and resume it. This changes the code to use a less invasive approach to determining colour availability on the terminal. (Bitbake rev: 4548a8f037eaf8d47a77052acc3e9ec264ac41e0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Colorize knotty interactive console outputSeth Bollinger2012-11-201-1/+5
| | | | | | | | | | | | | | | Add bold color output to log level name and standard color output to log msg when bitbake is run from an iteractive console. Color output is only enabled if the terminal supports color. Used Jason Wessel's recommendation for transparency on verbose, note and plain. (Bitbake rev: 2734240da2cc150f811129a6adf6eb4b2161b204) Signed-off-by: Seth Bollinger <seth.boll@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: kill duplicated import of 'time'Christopher Larson2012-11-141-1/+0
| | | | | | | | | The duplicated import could result in an UnboundLocalError. (Bitbake rev: a098cebd5c33ebd704efd35d9e655262283cbe1f) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: command: add error to return of runCommandChristopher Larson2012-11-011-14/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, command.py can return an error message from runCommand, due to being unable to run the command, yet few of our UIs (just hob) can handle it today. This can result in seeing a TypeError with traceback in certain rare circumstances. To resolve this, we need a clean way to get errors back from runCommand, without having to isinstance() the return value. This implements such a thing by making runCommand also return an error (or None if no error occurred). As runCommand now has a method of returning errors, we can also alter the getCmdLineAction bits such that the returned value is just the action, not an additional message. If a sync command wants to return an error, it raises CommandError(message), and the message will be passed to the caller appropriately. Example Usage: result, error = server.runCommand(...) if error: log.error('Unable to run command: %s' % error) return 1 (Bitbake rev: 717831b8315cb3904d9b590e633000bc897e8fb6) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Ensure last tasks are disaplyed correctly in the footerRichard Purdie2012-10-301-1/+1
| | | | | | | | | | | There was an issue where the last tasks run by bitbake would not correctly get displayed in the knotty footer. This was due to the total count including active tasks. This change ensures the footer is displayed if the are any running tasks. (Bitbake rev: d787e4efc106589811651bc18ca48d5223443b95) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>