aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
AgeCommit message (Collapse)Author
2016-01-11bitbake: toaster: add Provider modelEd Bartosh
Added new model Provider and a foreign key 'via' to link Recipe_Dependency to it. [YOCTO #6169] (Bitbake rev: e45fff6314741d46e2549b2f72ed380cbbb95593) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11bitbake: buildinfohelper: use providermapEd Bartosh
Used providermap in store_dependency_information function to find virtual dependencies. This should fix annoying warnings "stpd: KeyError saving recipe dependency" [YOCTO #6169] (Bitbake rev: 85c416ca338c886db6e79651e44727482df9fb07) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11bitbake: cooker: add providermap to dep_treeEd Bartosh
Added providermap information to the result of buildDependTree API. This will be used by Toaster to map virtual dependencies to recipes. (Bitbake rev: d3e07368549f30265f59846a260efa8230a225ca) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11bitbake: taskdata: refactor get_providermapEd Bartosh
Added optional parameter 'prefix' to filter out names that don't start with specified prefix. Changed existing call of get_providermap according to changed API. Optimized the code: got rid of extra loop and temporary list variable virts. (Bitbake rev: df5a1392d6f91ccb44a99721c7d847da242121bb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11bitbake: main/runqueue: Add --setscene-only option to bitbakeRichard Purdie
Its turning out that we really need a way to have bitbake just run the setscene tasks but not any real tasks, particularly for SDK operations. Add an option for this since its pretty straight forward. This allows various nasty workarounds in OE-Core to be removed. (Bitbake rev: e4a2aafa1650a227a04d92a8a0b31efaed2c310e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-08bitbake: fetch/git: Change to use clearer ssh url syntax for broken serversRichard Purdie
Some servers, e.g. bitbucket.org can't cope with ssh:// as part of the git url syntax. git itself is happy enough with this but you get server side errors when using it. This changes the git fetcher to use the more common ssh url format which also means we need a : before the path. Seems a shame to have to do this due to broken servers however it should be safe enough since this other form is the one most people use on the commandline so it should be safe enough. [YOCTO #8864] (Bitbake rev: 4193e99adce8e88f12ac88d7578ad39575f7e346) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-08bitbake: knotty: Use non-interactive mode as fallback for dumb terminalsRichard Purdie
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>
2016-01-08bitbake: cooker: fix findFilesMatchingInDir documentationRoss Burton
The documentation for findFilesMatchingInDir() was inconsistant with the implementation: the regex was escaped before searching so effectively it's a pure textual substring, and the machine example was broken. (Bitbake rev: 6bef981488ec94b46dbe3797acfecf9c4b6ecbbc) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-08bitbake: cooker: use in instead of countRoss Burton
No point counting all instances when we just want to know if there's any or not. (Bitbake rev: 3369072efb653339da8dbd1ca864ff8e1ff899ca) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06bitbake: ast: Add filename/lineno to mapped functionsRichard Purdie
Where we add in mappings for EXPORT_FUNCTIONS, add dummy filename and lineno data so ensure the assumption that all python functions have this is correct. (Bitbake rev: 547128731e62b36d2271c4390b3fee2b16c535dc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06bitbake: main: kill server without queue setupEd Bartosh
Setup of event queue includes registering of UI handler. This operation can fail when cooker is busy. However, there is no need in registering UI handler for terminating the server. Moved the call of connection.terminateServer before setting up of the event queue. This should make terminating server to work more reliably as it doesn't depend on setting up the event queue and registering UI handler anymore. This should also help Toaster backend to restart bitbake server and observer without getting "Could not register UI event handler" errors. [YOCTO #8776] (Bitbake rev: 0c5a9349f797d05c282c2ada1893e187e05f0576) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06bitbake: xmplrpc: split connect methodEd Bartosh
Current code in connect method sets up event queue, which requires registering UI handler. This functionality may not be needed for some operations, e.g. for server termination. Moved functionality of setting up event queue in from 'connect' method to 'setupEventQueue' in BitBakeXMLRPCServerConnection class. (Bitbake rev: 4429871da76d6bd29e023ff42740fe7daa6b40fa) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06bitbake: uievent: refactor retry loopEd Bartosh
Replaced 'while' loop with 'for' loop. Made the code more compact and hopefully more understandable. (Bitbake rev: 4e1e497c8432536b3522295e5b1284844ccea056) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06bitbake: uievent: get rid of EventHandler attributeEd Bartosh
This attribute was introduced by mistake. EventHandle is used in the code for the same purpose. (Bitbake rev: 8d505ec8913a7d51de48b4f52bb64c5d6a0bb08e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06bitbake: uievent: add error to registerEventHandler returnEd Bartosh
Current code throws Exception("Could not register UI event handler") if event handler can't be registered. The real reason of this is that cooker is in busy state. Error message lacks information about this. Added error message to the return value of registerEventHandler. Included returned error message into the log message and exception text. (Bitbake rev: 07de1ca7d57dcd0cc37406feae2949da12a3fa7a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06bitbake: cooker: add state.get_name methodEd Bartosh
Added method to convert state code into the human readable name. It will be used in logging and error reporting. (Bitbake rev: 9ec6379b27d210214d0b3f2e55962f721b7f5f51) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06bitbake: fetch2/__init__.py: Add support for 7-ZipJuro Bystricky
7-Zip is a file archiver claiming the highest compression ratio. This patch allows using 7-Zip commpressed files in bitbake recipes. Two common formats are supported: SRC_URI = "file://abc.tar.7z" SRC_URI = "file://abc.7z" (Bitbake rev: 7120f5bfaae54e91bc95da5667831424724ce613) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06bitbake: utils: Remove double compile from better_compileRichard Purdie
Poking around the ast to correct linenumbers works well for runtime failures but not for parsing ones. We can use blank linefeeds to correct the line numbers instead, with the advantage that we don't need to double compile. (Bitbake rev: 10256ac3e7be7e691176ecc5d55856d88f1fe940) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06bitbake: fetch2/local.py: avoid using PREMIRRORRobert Yang
The PREMIRROR isn't useful for "file://", so avoid using it, this is good for searching speed and can reduce useless lines in log.do_fetch. (Bitbake rev: e130dca85bac82bd4d88f94a6bf9fe36e8ad4d7c) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06bitbake: siggen: Change exception note into a warningRichard Purdie
This makes no sense as just a note, its at least a warning and useful to get an idea of which codepath is failing. (Bitbake rev: 0194cf0da24dc72dab0612cd54aa5190e6cd92f2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06bitbake: data: Drop misleading ExpansionError exceptionRichard Purdie
This codepath can be triggered by a python indentation error for example. Showing it as an ExpansionError is misleading. Change the code to add a warning about where the failure came from (in particular giving the variable key name that triggered it) but raise the proper exception. (Bitbake rev: d49d46533704e8b4404e29abfb5a7383d704c91a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06bitbake: cooker: Drop useless parsing exceptionRichard Purdie
The SyntaxError exception simply shows the recipe that failed to parse which is pretty useless without the actual exception. We could make it print more info, however we can just use one of the more generic handlers instead and remove this one. For a python indentation error, this leads to a much more readable error message. (Bitbake rev: 9241eb10847634e34c5ff8767ed8c114f66ff6cf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06bitbake: data: Pass lineno/filename data from build_dependenciesRichard Purdie
If parse_python() fails, the output is confusing. Passing in the extra file/line data isn't expensive and improves readability significantly. (Bitbake rev: a4bb753488d322e0e31c31d6377ba780f2f824c4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06bitbake: codeparser: Add support for correct linenumbersRichard Purdie
Currently, if there is something like a python indentation error in a python function, the linenumbers and even file aren't reported correctly. This allows lineno and filename parameters to be passed in to correct this. The lack of a lineno parameter to python's compile() function is worked around by using empty linefeeds. Ugly, but effective and with minimal performance overhead. (Bitbake rev: 5796ed550d127853808f38257f8dcc8c1cf59342) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-22bitbake: event/utils/methodpool: Add a cache of compiled code objectsRichard Purdie
With the addition of function line number handling, the overhead of the compile functions is no longer negligible. We tend to compile the same pieces of code over and over again so wrapping a cache around this is beneficial and removes the overhead of line numbered functions. Life cycle of a cache using a global like this is in theory problematic although in reality unlikely to be an issue. It can be dealt with if/as/when we deal with the other global caches. (Bitbake rev: 98d7002d1dca4b62042e1589fd5b9b3805d57f7a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-22bitbake: BBHandler: Improve IN_PYTHON_EOF handlingRichard Purdie
Now we're actively using the line numbers for other thins, having magic values like IN_PYTHON_EOF causes problems, in particular, 32 bit overflow on 32 bit machines. There is a neater way to signal eof to feeder(), just using an extra parameter so use this instead and drop the IN_PYTHON_EOF magic values. This has the added bonus that line numbers are then correct for python functions at the end of files. (Bitbake rev: e0f05871c2a6f1e86ae19ad343c7c6f822ddb67e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: toaster: remove 2 confusing parametersEd Bartosh
Removed nobrowser and brbe script parameters as both are confusing and nobrowser is not used anywhere. brbe parameter usage can only be justified if toaster doesn't work properly and user has to manually connect toaster to running bitbake server. Even in this scenario it's very unlikely to achieve as toaster script is not designed for this kind of usage. (Bitbake rev: 0fd04ede3fda6894d97a5ef830b79dbbc9c6cf51) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: toaster: move setting of default valuesEd Bartosh
Set default values of script parameters just before they are parsed to increase readability. (Bitbake rev: 627f0d6adcfe281ef0487bf15a35151f1ceff194) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: toaster: move startup checks to a better placeEd Bartosh
Moved addr:port, bitbake.lock and toastermain.pid checks to the place where the rest of Toaster starting happens. (Bitbake rev: 0e7812b5512e609ea815db30be1d7caca896ab60) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: toaster: remove 2 unused functionsEd Bartosh
Removed check_pidbyfile and notify_chldexit functions from toaster script as they're not called in the script. (Bitbake rev: ead2823e5457c9c4d0321c2191fb99982b282d26) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: toaster: remove addtoConfiguration functionEd Bartosh
This function is useless as it's called just once and makes code less readable. (Bitbake rev: 96e85159905e44533882ad8290b1c9dd252ff3ea) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: toaster: updated header of the toaster scriptEd Bartosh
Updated GPL information, years of development and usage information. Removed outdated information about 2 ways of starting Toaster. (Bitbake rev: b4789c9e3093e1ec8e70f67305c88709443578e6) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: toaster: add MANAGE variableEd Bartosh
Used MANAGE variable to avoid repeating path to manage.py in many places in toaster script. (Bitbake rev: e8e19168ff43b72a2481771e7a40d9d7c155cfd2) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: toaster: remove unused variableEd Bartosh
Removed unused variable RUNNING from the toaster script. (Bitbake rev: 8b3f0b2c6efa2962d9c16e453f4d2c1af6419c6c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: toaster: split long lines, add/remove whitespaceEd Bartosh
Made toaster script more readable by splitting long lines and removing and adding whitespace. (Bitbake rev: 6d61d7903eb4fb12464bfea54d3a225f99ad394f) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: toaster: check if address:port is in useEd Bartosh
Used new management command checksocket to check if Toaster can listen on address:port. [YOCTO #8775] (Bitbake rev: 8a306ffe5a3642fe833c875362a183096a39f641) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: toaster: implement checksocket commandEd Bartosh
Implemented new management command to check if it's possible to listen on specified address:port. [YOCTO #8775] (Bitbake rev: 0339b90842fd7c878c511b4b89ebcaee9a431bba) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: knotty: Improve exception error messageRichard Purdie
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>
2015-12-18bitbake: knotty: Fix row/column function return value issueRichard Purdie
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>
2015-12-18bitbake: buildinfohelper: Update for buildstats layout changeRichard Purdie
This updates buildinfo helper for the recent buildstats layout change (Bitbake rev: 30311bbe667e9f22de17fae00ff58da06a7c3e23) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: fetch: use orig localpath when calling orig methodChristopher Larson
When a mirror tarball is fetched, the original fetch method is called, which unpacks the mirror tarball. After the original method is called, it checks the localpath of the mirror tarball rather than the clone path, which isn't ideal, particularly if the mirror tarball was removed due to being out of date. We know the original fetch method will do what it needs to do to get its content in the form it needs from the mirror tarball, so we can use its localpath instead. (Bitbake rev: 1732ad65d6c7d67b7d07cb30c074f5016adadbea) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: utils: Improve traceback from better_exec internal errorsRichard Purdie
If you break the internals of better_exec(), you get a very weird error about tb_next not being a method of None. Fix this by checking we can step back a trace level. (Bitbake rev: 1d710ed484f68fca0789022dde7ba877b9a894f5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: ast/event/utils: Improve tracebacks to include file and line ↵Richard Purdie
numbers more correctly Currently bitbake tracebacks can have places where the line numbers are inaccurate and filenames may be missing. These changes start to try and correct this. The only way I could find to correct line numbers was to compile as a python ast, tweak the line numbers then compile to bytecode. I'm open to better ways of doing this if anyone knows of any. This does mean passing a few more parameters into functions, and putting more data into the data store about functions (i.e. their filenames and line numbers) but the improvement in debugging is more than worthwhile). Before: ---------------- ERROR: Execution of event handler 'run_buildstats' failed Traceback (most recent call last): File "run_buildstats(e)", line 43, in run_buildstats(e=<bb.build.TaskStarted object at 0x7f7b7c57a590>) NameError: global name 'notexist' is not defined ERROR: Build of do_patch failed ERROR: Traceback (most recent call last): File "/media/build1/poky/bitbake/lib/bb/build.py", line 560, in exec_task return _exec_task(fn, task, d, quieterr) File "/media/build1/poky/bitbake/lib/bb/build.py", line 497, in _exec_task event.fire(TaskStarted(task, logfn, flags, localdata), localdata) File "/media/build1/poky/bitbake/lib/bb/event.py", line 170, in fire fire_class_handlers(event, d) File "/media/build1/poky/bitbake/lib/bb/event.py", line 109, in fire_class_handlers execute_handler(name, handler, event, d) File "/media/build1/poky/bitbake/lib/bb/event.py", line 81, in execute_handler ret = handler(event) File "run_buildstats(e)", line 43, in run_buildstats NameError: global name 'notexist' is not defined ---------------- After: ---------------- ERROR: Execution of event handler 'run_buildstats' failed Traceback (most recent call last): File "/media/build1/poky/meta/classes/buildstats.bbclass", line 143, in run_buildstats(e=<bb.build.TaskStarted object at 0x7efe89284e10>): if isinstance(e, bb.build.TaskStarted): > trigger = notexist pn = d.getVar("PN", True) NameError: global name 'notexist' is not defined ERROR: Build of do_package failed ERROR: Traceback (most recent call last): File "/media/build1/poky/bitbake/lib/bb/build.py", line 560, in exec_task return _exec_task(fn, task, d, quieterr) File "/media/build1/poky/bitbake/lib/bb/build.py", line 497, in _exec_task event.fire(TaskStarted(task, logfn, flags, localdata), localdata) File "/media/build1/poky/bitbake/lib/bb/event.py", line 170, in fire fire_class_handlers(event, d) File "/media/build1/poky/bitbake/lib/bb/event.py", line 109, in fire_class_handlers execute_handler(name, handler, event, d) File "/media/build1/poky/bitbake/lib/bb/event.py", line 81, in execute_handler ret = handler(event) File "/media/build1/poky/meta/classes/buildstats.bbclass", line 143, in run_buildstats trigger = notexist NameError: global name 'notexist' is not defined ---------------- (Bitbake rev: 1ff860960919ff6f8097138bc68de85bcb5f88b0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18bitbake: runqueue: Add support for <task>- syntaxRichard Purdie
It can be useful to run all tasks up to but not including a specific task. The main reason this was never added was the lack of a good syntax. This patch uses the syntax <taskname>- to denote this behaviour which is simple, not invasive and fits what we need from good syntax IMO, hence we can add this. (Bitbake rev: 99ccfd411ab3f7baa111f9f3d50fae68816a9a83) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-14bitbake: toaster: tables Set a default order for the software recipes tableBelen Barros Pena
Add default order by recipe name, so that the table content is sorted when the page loads. [YOCTO #8791] (Bitbake rev: 36cc814b64bcf3825ed096ade0b8c590e497259f) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-14bitbake: toaster: rework checking of Django versionEd Bartosh
Checked django version considering information from toaster-requirements.txt, e.g. if requirements file contains line "Django>1.8,<1.9" toaster should be able to check that requirement correctly. (Bitbake rev: 49976eca4a6e37e7653814c569badcd3e0fb719a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-14bitbake: toaster: monkey patch QuerysetEd Bartosh
Fixed 'database is locked' issue by monkey patching django QuerySet methods. The actual patching places were found by bisecting Django codebase. This commit should be removed after Django is fixed if it's fixed at all. (Bitbake rev: 175411bf05423b1892c7928c2b928843b39645f0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-14bitbake: toaster: removed extra calls of migrateEd Bartosh
One manage.py migrate should be enough to apply migrations for all applications. Extra calls just slow toaster script down. Removed calls of migrate for orm and bldcontrol apps. (Bitbake rev: 9299d7fa88e51294c4fd3f1354874d8253d25aff) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-14bitbake: toaster: work around 'database is locked' errorEd Bartosh
When sqlite can not cope with a stream of 'insert' queries it throws 'database is locked' exception. Wrapping model.save in transaction.atomic context and repeating the call should solve this issue. (Bitbake rev: eb305308ca8f6228c6f52dac1bd941f29c7e5eb6) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-14bitbake: toaster: fixed format stringsEd Bartosh
Printing id as a number breaks toaster if object is not saved yet as id/pk is None in this case. Changed format spec to print id as a string in __str__ and __unicode__ methods of Build, Task and LayerVersion models. (Bitbake rev: d5ca2bae623db214764324da5c9e4dac6beef760) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>