summaryrefslogtreecommitdiffstats
path: root/bitbake
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: daemonize: Always print any remaning UI events at exit2.4_M2Richard Purdie2017-08-031-1/+1
| | | | | | | | | | | | | If there are events in the UI queue we want to print them regardless of whether we're handling an exception or something like SystemExit. This improves error messages for some other failure cases where currently no logging would get printed and leave the user confused as to what went wrong. (Bitbake rev: 76c4f2c20216719736766e8ae7d089ccd061b71b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: Ensure all tasks are shown in task dependency treeRichard Purdie2017-08-031-3/+3
| | | | | | | | | | | | "bitbake -g m4-native -c do_unpack" doesn't list any dependencies in task-depends.dot. This is because no header describing the task was added unless a task has dependencies. Tweak the code to fix this. [YOCTO #10893] (Bitbake rev: e2fbe728769f09ef4178e2ef4d69a2f60ffe3ebb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: daemonize: clean up codeRichard Purdie2017-07-311-134/+14
| | | | | | | | | | This was originally based on some other code but its mostly misleading comments now. Massively clean this up and accept its now a total fork. There are no funciton changes here, just cleanup. (Bitbake rev: 3daa9001269e5b9156d0eb3299d2628d2d219fff) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: daemonize: Ensure child process exits safelyRichard Purdie2017-07-311-3/+8
| | | | | | | | | | | | | When we create the child, if an exception occurred it was transfering back into the parent context. We don't want to do that us use a try/finally to ensure we exit. We need to ensure a traceback is printed and any queued UI messages which may not have made it to the client UI at this point. (Bitbake rev: dec1d2c26f6cb3ffeb44beaab0129cd531a6d08b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: process: Add some extra server startup logsRichard Purdie2017-07-311-1/+4
| | | | | | | | | | We have cases where the server is being started but we're not seeing any messages from it. Add some earlier logging so we can try and better understand where issues may be occurring. (Bitbake rev: 10a6a48c0c5a2fe2051e90143e66075356853971) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: process: Reorder server command processing and handle EOFErrorRichard Purdie2017-07-311-13/+18
| | | | | | | | | | | | | If the connection control socket and the command channel close together, we can race and hit EOFError exceptions before we close the channel. Reorder the code to handle this in the correct order and ignore the EOFError exceptions as they mean the client is disconnecting and shouldn't terminate the server. (Bitbake rev: 974281ed72d8366baa16ee85f7e93970689b5956) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: wget: fix FusionForge workaroundRoss Burton2017-07-311-6/+3
| | | | | | | | | | | | | | | | | My previous assertion about FusionForge appears to have been wrong, or FusionForge has changed behaviour, or both. FusionForge now mandates that downloads have the Accept header set, despite that header being optional, and returns a 406 Not Acceptable error if it isn't set. As we were pretending that 406 was actually 405 (Moved) and tried to handle it as a redirect this results in an infinite loop until Python kills the recursion. Delete the handling of 406 as 405, and pass Accept: */* in the headers. (Bitbake rev: bb70ae0c9aac5ec688026d23a64ac0cac1947187) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: move to new bitbake xmlrpc defaultDavid Reyna2017-07-313-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | The bitbake option "-t SERVERTYPE" was deprecated and can be removed since the desired XMLRPC listener now the default. The bitbake server port cannot be "-1" anymore and must be explicitly passed. There is a race condition for the bblock file to not only be created but to actually be populated, so a delay test loop is required (usually only one pass). The 'xmlrpcclient' is now the class that allows Toaster to for example kill builds. The events for populating the recipe parsing now either show only the final result or are skipped entiredly, so the progress calculator needs to be changed to not block on the parsing phase. [YOCTO #11851] (Bitbake rev: 2aa7ad38f760ec003fb18faa5aa0014cff191a7a) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: enable remote HTTP API for status aggregationDavid Reyna2017-07-314-4/+100
| | | | | | | | | | | | | Add support for Toaster aggregators with a set of api links that return JSON data for (a) builds in progress, (b) builds completed, (c) specific build data, and (d) an is-alive health ping link. [YOCTO #11794] (Bitbake rev: d8e79661c69671dd424dca5cc3f7f2f855b0afed) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Tweak debug message to make it more readable/diffableRichard Purdie2017-07-311-1/+1
| | | | | | | | | Having this as one huge long line isn't easy to manipulate, split it into multiple lines for ease of debugging issues. (Bitbake rev: 5753fe81194f75fbcf4ccdc733cc585d02794cb1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: fix checkstatus fallback to MIRRORSRoss Burton2017-07-311-3/+2
| | | | | | | | | | The checkstatus() code was expecting checkstatus to throw exceptions if it failed, but in general it should return False. (Bitbake rev: 57be5cc6228518e60f564570a39cebbeb6cf564e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: fix GitShallowTest.test_bitbakeChristopher Larson2017-07-301-1/+1
| | | | | | | | | | | | | | | `git fetch --tags` seems to interact badly with `mirror=fetch`, resulting in the regular branches not being fetched, so drop the unnecessary `--tags`. This fixes this unit test failure: `bb.fetch2.FetchError: Fetcher failure: Unable to resolve 'master' in upstream git repository in git ls-remote output for /tmp/tmp4ag_mgmn/gitsource` [YOCTO #11698] (Bitbake rev: 2d0203fae08c5ff8dc3e9afaa9a819abc4a1af6f) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: main: Always return 0 for bitbake --kill-serverRichard Purdie2017-07-301-2/+4
| | | | | | | | | | If the server isn't running return 0 as to do otherwise complicates scripts which do cleanup of bitbake servers which would potentially be memory resident. (Bitbake rev: 0f85c54385f325f3ebbf911b35bbac11b8863b6b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: process: Clean up server communication timeout errorsRichard Purdie2017-07-301-12/+3
| | | | | | | | | | | | | | | | | | | | | This timeout path was commonly hit due to errors starting the server. Now we have a better way to handle that, the retry logic can be improved and cleaned up. This patch: * Makes the timeout 5s rather than intervals of 1s with a message. Paul noted some commands can take around 1s to run on a server which has just been started on a loaded system. * Allows a broke connection to exit immediately rather than retrying something which will never work. * Drops the Ctrl+C masking, we shouldn't need that anymore and any issues would be better handled in other ways. This should make things clearer and less confusing for users and is much cleaner code too. (Bitbake rev: 8633b7cd03cfaba3e0359aa5da22fc76b66768c7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: process: Don't leak open pipes upon reconnectionRichard Purdie2017-07-301-1/+18
| | | | | | | | | If we reconnect to the server, stop leaking pipes and clean up after ourselves. (Bitbake rev: f41e4e971e807157be68cf4496580494b8b60643) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: process/cooker: Allow UI process to know if the cooker was started ↵Richard Purdie2017-07-302-3/+23
| | | | | | | | | | | | | | | | | | | successfully Currently if the server fails to start, the user sees no error message and the server will be repeatedly attempted to be started until some longer timeouts expire. There are error messages in the cookerdeamon log but nobody thinks to look there. Add in a pipe which can be used to tell the starting process whether the cooker did actually start or not. If it fails to start, no further attempts can be made and if present, the log file can be shown to the user. [YOCTO #11834] (Bitbake rev: 57000d44beb1aeba37dfc70782b0d6418943acc5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: process: Move socket keep alive into BitBakeProcessServerConnectionRichard Purdie2017-07-301-4/+6
| | | | | | | | | This cleans up the socket keep alive into better class structured code and adds cleanup of the open file descriptors upon shutdown. (Bitbake rev: 77fd3a3a29a569e212374b27aea742ddbaafcdd5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: process: Allow BBUIEventQueue to exit cleanlyRichard Purdie2017-07-301-3/+8
| | | | | | | | | Currently the monitoring thread exits with some error code or runs indefinitely. Allow closure of the pipe its monitoring to have the thread exit cleanly/silently. (Bitbake rev: 930d077637928213e13a07c78fee3bf7a8c37ebf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: process: Ensure ConnectionReader/Writer have fileno() and close() ↵Richard Purdie2017-07-301-0/+9
| | | | | | | | | | | methods Expose the underlying close() and fileno() methods which allow connection monitoring and cleanup. (Bitbake rev: f79187f4ebfad7969be47b429995e7f7a3e33c1e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: event: Don't write duplicate logs to stdout and stderr in no UI caseRichard Purdie2017-07-301-10/+17
| | | | | | | | | | | | This code would duplicate messages to stdout and stderr when no UI connected and there were error level messages. Rework the code so it either uses stderr (for errors and above) or stdout for warnings/debug but not both for the same messages. (Bitbake rev: 45cff5734ba2ba8c8d36d17d722a5804d39b258b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: fix regression after recent server changesPaul Eggleton2017-07-273-7/+47
| | | | | | | | | | | | | | | | | | We were bridging the gap between the server and UI here by calling a bb.siggen.find_siginfo, a function defined and set on that module from the metadata. This worked from the UI side before but since the recent server changes is no longer accessible. Create a new command so this can execute on the server side and return the result by way of a new event. (We're still running compare_sigfiles() on the signature generator but that isn't quite the same thing and does still work.) Fixes [YOCTO #11844]. (Bitbake rev: fdcea991baa4f83d9c98d468d7b49c8c388a4a15) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/fetch2/__init__.py: Fix unpack commentMark Hatle2017-07-271-1/+1
| | | | | | | (Bitbake rev: b8f477de204ab5d0680b2b7c42370d13395be46c) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/utils.py: Add missing debug levelMark Hatle2017-07-271-2/+2
| | | | | | | (Bitbake rev: a0cd748d2f830a305da086eff3462875f64f2a70) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__.py: replace stray logger.warn() with logger.warning()Andre McCurdy2017-07-251-1/+1
| | | | | | | | | | | | | | Update stray usage of deprecated logger.warn(), which was introduced to fetch2/__init__.py after all other instances had been replaced by logger.warning(): http://git.openembedded.org/bitbake/commit/?id=5a53e7d7b017769a6eb0f0a6335735a1fe51a5ec http://git.openembedded.org/bitbake/commit/?id=676a5f592e8507e81b8f748d58acfea7572f8796 (Bitbake rev: 1b14f115a9e929e29e91e8ac70826a3fe7259961) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/wget: mitigate a wget race condition when listing FTP directoriesRoss Burton2017-07-251-12/+11
| | | | | | | | | | | | | | | | | | | | | | When wget is fetching a listing for a directory over FTP it writes to a temporary file called .listing in the current directory. If there are many such operations happening in parallel - for example during 'bitbake world -c checkpkg' - then up to BB_NUMBER_THREADS instances of wget will be racing to write to, read, and delete the same file. This results in various failures such as the file disappearing before wget has processed it or the file changing contents, which causes checkpkg to randomly fail. Mitigate the race condition by creating a temporary directory to run wget in when doing directory listings. [ YOCTO #11828 ] (Bitbake rev: 91d4ca93df092cf86ab84faaa94cc66ff9f43057) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: process: Change timeout warning to a noteRichard Purdie2017-07-241-1/+1
| | | | | | | | | | | The warning message currently shown can occur more frequently than previously if a previous bitbake server is shutting down and we're reconnecting to a new server. Change it to a note message to match the higher level connection logging retry messages and so as not to interfer with selftests. (Bitbake rev: b7514340cd6a2753eb217b059229bb279c3849ec) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker/process: Drop server_main functionRichard Purdie2017-07-242-23/+21
| | | | | | | | | | | | | | Now that there is only one server, this abstraction is no longer needed and causes indrection/confusion. The server shutdown is also broken with the cooker post_server calls happening too late, leading to "lock held" warnings in the logs if PRServ is enabled. Remove the abstraction and put the shutdown calls in the right order with respect to the locking. (Bitbake rev: c0ddde7cf680225127d6285685652b905ed176c3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: prserv/serv: Improve process exit handlingRichard Purdie2017-07-241-2/+17
| | | | | | | | | | | | | | | | | | | The server shutdown is currenlty laggy and race prone. This patch: * adds a waitpid so that no zombie server is left around if its not running in daemon mode. * adds a quit "sentinal" using a pipe so that we're not sitting in a socket poll() until timeout in order just to quit. * use a select() call to poll the socket and the pipe for a quit signal. The net result of this change is that the prserv exits with the cooker server and it does so immediately and doesn't wait for the select/poll calls to timeout. This makes bitbake a lot more responsive for startup/shutdown and doesn't cause UI timeout errors as often when prserv is used. (Bitbake rev: 0b5a837477d18442caf97dd0fa14a806c54f5842) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget.py: improve error handling during sstate checkPatrick Ohly2017-07-211-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the sstate is accessed via HTTP, the existence check can fail due to network issues, in which case bitbake silently continues without sstate. One such network issue is an HTTP server like Python's own SimpleHTTP which closes the TCP connection despite an explicit "Keep-Alive" in the HTTP request header. The server does that without a "close" in the HTTP response header, so the socket remains in the connection cache, leading to "urlopen failed: <urlopen error [Errno 9] Bad file descriptor>" (only visible in "bitbake -D -D" output) when trying to use the cached connection again. The connection might also get closed for other reasons (proxy, timeouts, etc.), so this is something that the client should be able to handle. This is achieved by checking for the error, removing the bad connection, and letting the check_status() method try again with a new connection. It is necessary to let the second attempt fail permanently, because bad proxy setups have been observed to also lead to such broken connections. In that case, we need to abort for real after trying twice, otherwise a build would just hang forever. [YOCTO #11782] (Bitbake rev: 6fa07752bbd3ac345cd8617da49a70e0b2dd565f) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: trim build target inputDavid Reyna2017-07-211-2/+2
| | | | | | | | | | | | Trim the entered built target value so that Toaster is not confused with no real targets nor a ghost second target. [YOCTO #11727] (Bitbake rev: dd83c732b945ba6f9b7cdf66f6e88cfd15a745a0) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: set clone progress default to offDavid Reyna2017-07-212-4/+4
| | | | | | | | | | | | | | Set the clone progress to be off by default for the benefit of command line projects and 'Local Yocto' builds. For Toaster managed projects that do use the clone feature the clone progress status is already explicitly set by the existing code and thus displayed. [YOCTO #11744] (Bitbake rev: d25a3088150b2a277242027c12becdeb88c45517) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: include setscene in task progressDavid Reyna2017-07-211-3/+4
| | | | | | | | | | | | | Change the task progress counting from the task order field which excludes setscene to the task completion field which counts all completed tasks regardless of type. [YOCTO #9971] (Bitbake rev: 485b328430dcdfd0b52f09f01ebd490d09459ea3) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Update to version 1.35.0 (development version with server rework ↵Richard Purdie2017-07-212-2/+2
| | | | | | | | changes) (Bitbake rev: eef7a1a3eb0365da5ed2bc9688203fba3b6a61b5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: fire an event when there are missing checksumsPaul Eggleton2017-07-211-0/+10
| | | | | | | | | | | If BB_STRICT_CHECKSUMS is set to anything other than "1" i.e. we're not going to raise an error, then fire an event so that scripts can listen for it and get the checksums. (Bitbake rev: 8b2ccb4b865f2df118ef668847df682a83f9c500) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: allow hiding checksum warningPaul Eggleton2017-07-211-0/+6
| | | | | | | | | | | | | If BB_STRICT_CHECKSUMS is set to "ignore" then don't display a warning if no checksums are specified in the recipe. This is not intended to be used from recipes - it is needed when we move to using more standard code paths to fetch new files from scripts i.e. where we don't know what the checksums are in advance. (Bitbake rev: f15ca7339de8a448a93a14cf6130b3925178a920) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tinfoil: add more doc commentsPaul Eggleton2017-07-211-0/+65
| | | | | | | | | | We want this API to be easier to use, so add missing function documentation to help with that. (Bitbake rev: 3e0e002d6497caa987f327cd83ad4db82cca6810) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tinfoil: add simple API for getting cached recipe informationPaul Eggleton2017-07-211-0/+142
| | | | | | | | | | | | | | | | | | | | | A common task for tinfoil-using scripts is to iterate over all recipes. This isn't too difficult with the current API, but the pkg_* variables are a little awkward and are really designed for bitbake's internal usage - and it gets a bit more difficult when you want to access some of the other information such as packages and rprovides. To resolve this, create a new recipe info class and add an all_recipes() function to generate this for all recipes. Also add a get_recipe_info() function to get the information for a specific recipe (by PN). (It might perhaps be suggested that we already have a structure similar to this in the cache, however the one we add here is designed for external use and allows the internal structures to change if needed without affecting the API). (Bitbake rev: 308994028e59735ca726c5d2c1f0f85baccfe89d) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tinfoil: enable access to additional cached itemsPaul Eggleton2017-07-212-0/+40
| | | | | | | | | | | Add access to fn_provides, packages, packages_dynamic and rproviders on the recipecache object. This requires an additional corresponding command plumbing to be added. (Bitbake rev: 3df9b7c615174a6557581f3cd157842a28f6bb26) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tinfoil: add functionality for running full buildsPaul Eggleton2017-07-211-0/+154
| | | | | | | | | | | | | | | | Up to this point, if you wanted to run build tasks in the normal way they get run from a python script, there was no other way than to shell out to bitbake. Worse than that, you couldn't have tinfoil active during that because only one bitbake instance could be running at once. As long as we're prepared to handle the events produced, we can create a wrapper around calling the buildTargets command. Borrow code from knotty to do this in such a way that we get the expected running task display (courtesy of TermFilter) and Ctrl+C handling. (Bitbake rev: 43761eee756be52a1021be53a40dc591a6c35fa7) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: make it possible to use termfilter without either consolePaul Eggleton2017-07-211-2/+4
| | | | | | | | | | | This isn't useful for knotty itself, but for use from tinfoil in case we can't get access to either the console or errconsole, allow either to be unspecified (None). (Bitbake rev: 7544de437fc66b81502ecdb5db859182c45827cb) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/ui/uihelper: indicate to caller of eventHandler() if events ↵Paul Eggleton2017-07-211-0/+3
| | | | | | | | | | | | handled It is useful for the caller to know whether the uihelper has handled the event passed so that it can skip other event handling code if so. (Bitbake rev: be498abfbbb19bdd31e5b53713a74049007e3737) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/event: refactor printing eventsPaul Eggleton2017-07-217-71/+53
| | | | | | | | | | | | We really ought to have just one place where the string representation of these events is produced. This doesn't take any real control away from the UI - if an alternative representation is desired, that can still be made. (Bitbake rev: cb15db2a799be6d8eab9a2a43a9a573f89229cff) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tinfoil: set a flag when recipes have been parsedPaul Eggleton2017-07-211-0/+3
| | | | | | | | | | Make it easy to determine if recipes are parsed (and thus information about available recipes is in memory). (Bitbake rev: 7efde2df2ff25063d36ac015146f1975284a69ff) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tinfoil: add a parse_recipes() functionPaul Eggleton2017-07-212-2/+8
| | | | | | | | | | | | Python style recommends underscore based naming rather than camelCase, and thus the former has been used for most of tinfoil's functions. Add an underscored version of parseRecipes() for consistency and change the one place we call it to use the new version. (Bitbake rev: 821f6c41d850752d2bcc2ccd4f8e75b2897a0a3e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tinfoil: add internal mode to build_file() functionPaul Eggleton2017-07-213-15/+37
| | | | | | | | | | | | | | | | | In OE's devtool we want to repeatedly run build_file() without showing unnecessary messages and triggering buildhistory for each call. build_file() is just a wrapper around the buildFile command. Change the final "hidewarning" parameter of the buildFile command to "internal" and have this call a new buildFileInternal() function without triggering any of the normal build events, silencing the normal info messages from the runqueue ("Executing RunQueue Tasks", "Tasks Summary" etc.) and avoiding calling parseConfiguration() which we've already done at this point. (Bitbake rev: ba53e067a2d448dd63b4ca252557ce98aa8e6321) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb/main.py: fix logic for --observe-onlyRobert Yang2017-07-211-1/+1
| | | | | | | | | | | | | | | | | Fixed: $ bitbake --observe-only FATAL: '--observe-only' can only be used by UI clients connecting to a server. And even: $bitbake --observe-only -B localhost:-1 FATAL: '--observe-only' can only be used by UI clients connecting to a server. This was beucase the brackets were in a wrong position. (Bitbake rev: 4ffc91a2b3eb13e98078e6b1913f056a0c1797bc) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb/main.py: avoid starting server when not neededRobert Yang2017-07-211-2/+8
| | | | | | | | | | | | | | | | | | | | | | | Fixed 1: $ . ../poky/oe-init-build-env-memres . $ bitbake -m $ bitbake -m # shutdown it again $ bitbake -m Starting bitbake server... Terminated bitbake server. It starts the server and kill it which is redundant. $ bitbake -m $ bitbake --status-only Starting bitbake server... It starts the server which is not what we need. (Bitbake rev: 335fd0106359dddfe1eeb0c7d0bc03f8454b895c) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb/main.py: fix infinite loop for --server-onlyRobert Yang2017-07-211-1/+1
| | | | | | | | | | | | | | | Fixed: $ bitbake --server-only -B localhost:-1 Infinite loop Reconnecting to bitbake server... [snip] Break the loop when server-only can fix the problem. (Bitbake rev: c4d5c3dab5b35f3c6713efad1c8a23229ce4e56b) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: server/process.py: fix self.bitbake_lock.write()Robert Yang2017-07-211-2/+2
| | | | | | | | | | | | | | | | There is no global var "configuration", so the old code hang at self.bitbake_lock.write(), and nothing wrote to bitbake.lock. I didn't figure out why it hang (but not print errors). Reproducer: $ bitbake -B localhost:-1 world -k Check bitbake.log, there was nothing, now fixed. (Bitbake rev: dbdd9010663cd8dcb328e1b6fb40e3a777293bc5) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cookerdata/cooker: Restore original datastore upon client disconnectRichard Purdie2017-07-212-0/+11
| | | | | | (Bitbake rev: 67ae612ab890965357d24a9bd35610cf813b79ba) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>