summaryrefslogtreecommitdiffstats
path: root/bitbake
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: ast: Add filename/lineno to mapped functionsRichard Purdie2016-01-061-0/+2
| | | | | | | | | | 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>
* bitbake: main: kill server without queue setupEd Bartosh2016-01-061-6/+7
| | | | | | | | | | | | | | | | | | | | | | 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>
* bitbake: xmplrpc: split connect methodEd Bartosh2016-01-063-2/+6
| | | | | | | | | | | | | | 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>
* bitbake: uievent: refactor retry loopEd Bartosh2016-01-061-9/+6
| | | | | | | | | | 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>
* bitbake: uievent: get rid of EventHandler attributeEd Bartosh2016-01-061-2/+2
| | | | | | | | | | 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>
* bitbake: uievent: add error to registerEventHandler returnEd Bartosh2016-01-062-5/+7
| | | | | | | | | | | | | | | 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>
* bitbake: cooker: add state.get_name methodEd Bartosh2016-01-061-0/+8
| | | | | | | | | | 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>
* bitbake: fetch2/__init__.py: Add support for 7-ZipJuro Bystricky2016-01-061-0/+4
| | | | | | | | | | | | | | 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>
* bitbake: utils: Remove double compile from better_compileRichard Purdie2016-01-061-5/+4
| | | | | | | | | | 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>
* bitbake: fetch2/local.py: avoid using PREMIRRORRobert Yang2016-01-061-0/+5
| | | | | | | | | | 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>
* bitbake: siggen: Change exception note into a warningRichard Purdie2016-01-061-1/+1
| | | | | | | | | 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>
* bitbake: data: Drop misleading ExpansionError exceptionRichard Purdie2016-01-061-1/+2
| | | | | | | | | | | | | 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>
* bitbake: cooker: Drop useless parsing exceptionRichard Purdie2016-01-061-5/+0
| | | | | | | | | | | | | | 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>
* bitbake: data: Pass lineno/filename data from build_dependenciesRichard Purdie2016-01-061-2/+2
| | | | | | | | | 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>
* bitbake: codeparser: Add support for correct linenumbersRichard Purdie2016-01-061-2/+8
| | | | | | | | | | | | | | | 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>
* bitbake: event/utils/methodpool: Add a cache of compiled code objectsRichard Purdie2015-12-223-8/+27
| | | | | | | | | | | | | | | 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>
* bitbake: BBHandler: Improve IN_PYTHON_EOF handlingRichard Purdie2015-12-221-14/+4
| | | | | | | | | | | | | | | | 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>
* bitbake: toaster: remove 2 confusing parametersEd Bartosh2015-12-181-11/+2
| | | | | | | | | | | | | | | | | 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>
* bitbake: toaster: move setting of default valuesEd Bartosh2015-12-181-6/+5
| | | | | | | | | | | 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>
* bitbake: toaster: move startup checks to a better placeEd Bartosh2015-12-181-26/+23
| | | | | | | | | | | 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>
* bitbake: toaster: remove 2 unused functionsEd Bartosh2015-12-181-12/+0
| | | | | | | | | | | 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>
* bitbake: toaster: remove addtoConfiguration functionEd Bartosh2015-12-181-11/+6
| | | | | | | | | | | 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>
* bitbake: toaster: updated header of the toaster scriptEd Bartosh2015-12-181-13/+7
| | | | | | | | | | | | 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>
* bitbake: toaster: add MANAGE variableEd Bartosh2015-12-181-6/+7
| | | | | | | | | | | 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>
* bitbake: toaster: remove unused variableEd Bartosh2015-12-181-1/+0
| | | | | | | | | | 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>
* bitbake: toaster: split long lines, add/remove whitespaceEd Bartosh2015-12-181-12/+19
| | | | | | | | | | | 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>
* bitbake: toaster: check if address:port is in useEd Bartosh2015-12-181-0/+5
| | | | | | | | | | | | | 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>
* bitbake: toaster: implement checksocket commandEd Bartosh2015-12-181-0/+69
| | | | | | | | | | | | | 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>
* 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: buildinfohelper: Update for buildstats layout changeRichard Purdie2015-12-181-5/+3
| | | | | | | | This updates buildinfo helper for the recent buildstats layout change (Bitbake rev: 30311bbe667e9f22de17fae00ff58da06a7c3e23) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: use orig localpath when calling orig methodChristopher Larson2015-12-181-1/+1
| | | | | | | | | | | | | | | | 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>
* bitbake: utils: Improve traceback from better_exec internal errorsRichard Purdie2015-12-181-2/+4
| | | | | | | | | | 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>
* bitbake: ast/event/utils: Improve tracebacks to include file and line ↵Richard Purdie2015-12-185-14/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* bitbake: runqueue: Add support for <task>- syntaxRichard Purdie2015-12-181-8/+18
| | | | | | | | | | | 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>
* bitbake: toaster: tables Set a default order for the software recipes tableBelen Barros Pena2015-12-141-0/+1
| | | | | | | | | | | | | 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>
* bitbake: toaster: rework checking of Django versionEd Bartosh2015-12-142-15/+11
| | | | | | | | | | | | | 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>
* bitbake: toaster: monkey patch QuerysetEd Bartosh2015-12-141-0/+30
| | | | | | | | | | | | | | | | 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>
* bitbake: toaster: removed extra calls of migrateEd Bartosh2015-12-141-19/+1
| | | | | | | | | | | | | 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>
* bitbake: toaster: work around 'database is locked' errorEd Bartosh2015-12-141-1/+19
| | | | | | | | | | | | | | 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>
* bitbake: toaster: fixed format stringsEd Bartosh2015-12-141-3/+3
| | | | | | | | | | | | | | 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>
* bitbake: toaster: use OneToOneField instead of ForeignKeyEd Bartosh2015-12-145-14/+13
| | | | | | | | | | | | | | | Used OneToOneField to reference BuildRequest in BRBitbake model. Fixed django warning: WARNINGS: Setting unique=True on a ForeignKey has the same effect as using a OneToOneField. (Bitbake rev: aaa4319ebbb06facb77b4ba936cf3aa2068ff238) Signed-off-by: Elliot Smith <elliot.smith@intel.com> 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>
* bitbake: toaster: Amend regex for MySQL database URLsElliot Smith2015-12-141-1/+2
| | | | | | | | | | | | | | | The database URL detection doesn't admit a MySQL URL without a port. As this is a common case (e.g. you would set the HOST to a mysql.sock path if pointing at a local MySQL server, with no port setting), amend the regex so it will correctly recognise paths, as well as HOST:PORT URLs. (Bitbake rev: 89386aab888f806d5aa4a8083c06566e48d9445b) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Remove compatible_layerversions() methodElliot Smith2015-12-142-26/+17
| | | | | | | | | | | | | | | | | Remove compatible_layerversions() and replace calls to it with calls to get_all_compatible_layer_versions(). The sorting done in compatible_layerversions() is not relevant, and the code can be simplified by using get_all_compatible_layer_versions(). [YOCTO #8364] (Bitbake rev: 7bca51277314f7c0b6ee0e0d470327dfd60d37fe) Signed-off-by: Elliot Smith <elliot.smith@intel.com> 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>
* bitbake: toaster: Check Django version against toaster-requirements.txtElliot Smith2015-12-141-2/+8
| | | | | | | | | | | | | | Instead of hard-coding the required Django version in the start script, look it up from the toaster-requirements.txt file. [YOCTO #8364] (Bitbake rev: 2149ff805424692f9fde29618f2ae0eb99f710d2) Signed-off-by: Elliot Smith <elliot.smith@intel.com> 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>
* bitbake: toaster: Update deprecated manage.py commandElliot Smith2015-12-141-1/+1
| | | | | | | | | | | | | | | | syncdb is deprecated in favour of migrate in Django 1.7: https://docs.djangoproject.com/en/1.8/releases/1.7/#schema-migrations Update to the "migrate" command in Toaster's start script. [YOCTO #8364] (Bitbake rev: 7ff1630574180e1895b90ecef1ea0caf51304446) Signed-off-by: Elliot Smith <elliot.smith@intel.com> 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>
* bitbake: toaster: Prevent deprecation warnings for RedirectViewElliot Smith2015-12-143-3/+2
| | | | | | | | | | | | | | | | | The API for RedirectView is due to change in Django 1.9, which means that Toaster generates deprecation warnings. Set the "permanent" flag when constructing RedirectView instances to prevent this warning. [YOCTO #8364] (Bitbake rev: 4aa09488bfe65cb365356b320cd9865643bb4fe5) Signed-off-by: Elliot Smith <elliot.smith@intel.com> 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>
* bitbake: toaster: Update API used to make runbuilds methods run in transactionsElliot Smith2015-12-141-2/+2
| | | | | | | | | | | | | | | runbuilds previously had its methods decorated with transaction.commit_on_success, which is now deprecated. transaction.atomic is an (almost) drop-in replacement for this, so use this instead. [YOCTO #8364] (Bitbake rev: c4804b84eaaef6a81027bae5cf8bfe63d949c293) Signed-off-by: Elliot Smith <elliot.smith@intel.com> 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>
* bitbake: toaster: rename get_query_set -> get_querysetEd Bartosh2015-12-141-4/+4
| | | | | | | | | | | Renamed get_query_set to get_queryset as get_queryset causes deprecation warning in Django 1.7 and is deprecated in Django 1.8 (Bitbake rev: ef8b399dccd413070e32ce05e013337ea01fa64d) 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>
* bitbake: toaster: Start Django machinery for database accessElliot Smith2015-12-141-0/+3
| | | | | | | | | | | | | | | | | | buildinfohelper, with the new import paths for our Django models and Django 1.8, was not getting an active connection to the database. In buildinfohelper, call django.setup() explicitly to make sure that the database connection is ready and models can be queried and saved. [YOCTO #8364] (Bitbake rev: 671aaab8cb7c494cd5c7621b45a6f41a203d8bb5) Signed-off-by: Elliot Smith <elliot.smith@intel.com> 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>